Classic Mac OS Software (Discussions on Applications) > Application Development & Programming in the Classic Mac OS
Applescript and JSON data in OS9?
Y2K:
On my main machine, I have some Applescripts that employ a shell script to send/fetch some JSON data either in the local network, or from the internet. Through some trial and error, I managed to translate it for my G4 machine that runs Leopard. However, I'm having trouble translating it to OS 9, and I'm not sure if what I'm trying to do is even possible with an early version of Applescript, as I'm new to OS9. I don't think the JSON messages themselves are the issue, it's the final phase where I'm supposed to post the constructed message, but Mac OS 9 probably doesn't understand shell script commands.
IIO:
MacOS9 does not even know what a shell is. :)
applescript itself is also like 15% different from OSX.
Y2K:
--- Quote from: IIO on July 17, 2021, 09:36:51 AM ---MacOS9 does not even know what a shell is. :)
applescript itself is also like 15% different from OSX.
--- End quote ---
Yup, that's exactly what I noticed. Hence, I wonder how this used to be done, if it was. JSON seems to be from the early 2000s and is useful for applications that don't go obsolete.
teroyk:
Lets try convert that shell script to Applescript. Can share that shell script?
Y2K:
--- Quote from: teroyk on July 17, 2021, 10:55:27 AM ---Lets try convert that shell script to Applescript. Can share that shell script?
--- End quote ---
Okay, the gist of it is below.
I'm not sure if this forum has specific formatting for code or not, Classilla doesn't show any of the formatting options!
####
set theSetting to "some stuff that's being sent"
set theDestination to "some address where stuff is being sent"
do shell script "curl --request PUT --data " & theSetting & " " & theDestination
Navigation
[0] Message Index
[#] Next page
Go to full version