Wednesday, September 28, 2022

#1 2021-07-18 12:05:30 pm

Riku
Member
Registered: 2016-05-23
Posts: 57

Mac OS 9 and JSON?

I know it's an odd one but I've got a new (and my first) OS9 machine and I'm currently exploring its Applescript capabilities, and if I could translate some of my most useful scripts for it. It's of course tricky to go back as I only started learning Applescript some years ago, and it's impossible to imagine which parts didn't exist back in the OS9 days.
JSON format was invented in the early 2000s so I'm imagining that there's a 50/50 chance that it could be handled somehow, as it's got to do with html.

Compiling the message I'm trying to send seems to be fine. But in OS X, I'm used to passing on the actual commands with shell script, and OS 9 doesn't know what shell script is. Are there any other alternatives to handling this?
The gist of it, approximately:

Applescript:

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

Operating System: Mac OS 9.2.x


Filed under: JSON, OS9, Mac OS 9

Offline

 

#2 2021-08-01 07:05:23 pm

maro
Member
From:: Nerima, Tokyo, Japan
Registered: 2004-05-30
Posts: 139
Website

Re: Mac OS 9 and JSON?

It seems an interesting theme.

JSON decoding is available in Classic Mac OS 9. 
Downloading data from web can be processed with URL Access Scripting, too.

But URL encoded data decoding is headache.

I'll do it by calling other Mac OS X machines via remote Apple Events and get the result.

Model: Mac mini 2020 M1
AppleScript: 2.7
Browser: Safari 605.1.15
Operating System: macOS 10.14


I wrote thousands of AppleScript to realize my idea. Natural language interface, voice recognition commander and so on. Though my mother toungue is strange language, Japanese, my most frequently write language is AppleScript. I believe it is for making things easy and powerful.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)