You are not logged in.
Pages:: 1
I have an external command/shell script which analyses some XML files and collects a lot of information in a dictionary-type of structure { key1: value1, key2: value2, ... }.
In Applescript I can call the tool via a line like
Applescript:
set theInfo to do shell script "/path/to/my/tool"
The shell script can output its data in whatever way is convenient for the applescript
What is the best way to pass the data from the shell script to the Applescript, so that in the Applescript I receive the data as a normal record { key1: value1, key2: value2, ... }
Can I somehow make use of the do shell script's as typeclass parameter?
Offline
Format the output of the shell script as a regular record: {x:"y", z:23} and use run script on that output. Voilá a proper record!
Applescript:
set theInfo to do shell script "/path/to/my/tool"
set myInfo to run script theInfo
Offline
Pages:: 1