Sending AppleScript from Terminal to RR

Dar Scott dsc at swcp.com
Sat Jul 10 17:27:24 EDT 2004


On Jul 10, 2004, at 3:04 PM, Kaveh Bazargan wrote:

>> Stop using AppleScript.  Use Transcript or shell scripts.
>
> Sounds like a good idea. But how do I send a Transcript from Terminal 
> to RR?

I'm having a little trouble picturing what you are doing.

If your Revolution app runs the scripts with shell() then the results 
will be returned when the shell script returns.

If the shell script runs the Revolution app, then that gets more 
complicated unless you use the command-line engine.  There you can 
communicate with stdin/stdout.  If the Revolution app does a single 
thing and then quits then its result could be left in a file.

If the shell script and the Revolution app are running independently, 
then you might try experimenting with communicating through named 
pipes.  I have had problems, but I was doing a sort of catch-22 thing 
with shell(), so you will likely have better luck.  You might be able 
to "telnet" to a Revolution app, or otherwise use sockets.

My approach would be to put the app in Revolution and do tiny shell() 
calls as needed, but primarily do the work in Transcript.  Consider 
what can't be done in Revolution.

If you need several command line apps running at the same time, then 
you will wish 'open process' worked in OS X.  A workaround would be to 
use appleScript to use terminal and then use 'open process' on Linux 
and when it is ready on OS X.  I've created externals that effective do 
an 'open process' of a sort, so making an external is an option.

Dar Scott







More information about the use-livecode mailing list