Using open process instead of shell
stephen at barncard.com
Sun Dec 24 17:05:21 EST 2017
Hi gang, I need a little help here.
I am creating a Macintosh app on the desktop for my own use.
I am making an archive of all the "Spirit of K JAZ" shows by the late
Jerry Dean. After the terrestrial radio station went off the air, he
and fellow air mate Stan Dunn started streaming the shows on the net for
most of the 2000 decade. There are over 800 1-hour shows in this
After archiving the first 200 shows, I quickly tired of using individual
apps to do the separate steps of photographing the cover, putting in
folder, and transferring the data, while keeping the same file name for all
of them. So I created a stack which controls several command line
I have three executable binaries that I call from this app.
All of the commands work great by using the shell command in LC, except for
the fact that my app waits until some of the commands have finished.
In the case of one of them for example, it is importing a audio file from
a CD, and turning it into a wave file using *ffmpeg*.
./ffmpeg -i '/Volumes/Audio CD/1 Audio Track.aiff'
[ above command on one line ]
This takes up to 10 minutes to copy for a 60 minute CD.
The ./ at the beginning is the only difference between what I was
saying in my shell call from LC and what works in Terminal.
The executables live directly adjacent to the live code stack, to simplify
addressing. I got about this far with my coding, reading stuff from
forums and the dictionary, but I just can't seem to put the right words
pData is the command that works from the shell.
on executeProcess pData
put whereAmI() into a; set the defaultFolder to a
put pData into URL it
open process "file:xprocess.bat" for text write
Does someone out there have a clear example of what I am looking for,
using a UNIX executable through *open process *?
1. call the function with parameters
2. allow livecode scripts to continue
3. continuously monitor and display data returned by that function
thank you all so much for any and all information,
And a happy non-sectarian Christmas to everyone!
*Stephen Barncard - Sebastopol Ca. USA - *
More information about the Use-livecode