Passing parameters from Rev to Applescript

Jim Ault jimaultwins at yahoo.com
Mon Dec 21 18:54:37 EST 2009


You can do a technique of setting application variables and reading  
them from another app that is running.
This is rather advanced, and can be dangerous to your process  
integrity, but it works.

Otherwise, just go with the basic method that uses strings (hard-coded  
as you say) as if from a command line.

Another gotcha can occur with the definition of line endings in  
Applescript.  Beware passing data strings that can contain cr's  
because Applescript uses those a script line ending characters.  This  
can give you an error in an Applescript that seems to run just fine  
otherwise.

So, Rev declares its own global, script local, and handler local  
variables, and so does Applescript.  This makes sense because both  
apps use variables and variable scoping differently.

Hope this helps.

Jim Ault
Las Vegas


On Dec 21, 2009, at 3:26 PM, Howard Bornstein wrote:

> Thanks Tom,
>
> This does work. So do I gather however, that you can't pass or  
> intermix Rev
> parameters directly with Applescript parameters? In other words, if  
> I have a
> variable in Rev called tColor which contains "Red", I can't ever use  
> that
> directly in an Applescript statement? Variables always have to be  
> plugged in
> to a hard-coded AS statement using the replace command or something  
> similar?
>
> -- 
> Regards,
>
> Howard Bornstein







More information about the use-livecode mailing list