Passing Values to RunRev from an AppleScript

Jim Ault JimAultWins at yahoo.com
Fri Dec 1 14:53:18 EST 2006


On 12/1/06 9:03 AM, "Dave" <dave at looktowindward.com> wrote:
> Does anyone know how I could pass a value back to RunRev from an
> AppleScript that is being run via the do myAppleScript as
> "AppleScript" command?
> 
> I can pass back a return value, but this stops the script from
> running, I would like to pass something back but have the script
> continue to run. 

I am not an expert in this area, but here are ideas and the last one I use
in my daily operations on Win and Mac.
-----
One way that should work is to compile the Applescript and run it as an app
that stays open.  Rev would trigger it to operate, the app would send a
message to the System to trigger it again in 1 second,  it then finishes a
cycle, returning a value to Rev.
-----
Another way, from the Rev side, you could repeatedly trigger the Applescript
everytime a new value was received by Rev.
-----
You could use shell and the environment variables to move data between apps.
-------------------------
Perhaps simpler to implement is that the Applescript would write text files
to a folder that Rev would scan and read.  I use this everyday-all-day to
move data from Rev to FoxPro, then back to Rev asynchronously.

Rev -- (not the exact syntax)
put "u/a/b/c/incomingAS/" into folderpath
if there is a file (folderpath"dataForMe.txt") then
   put url ("file:"& folderpath&"dataForMe.txt") into incoming
   delete file ( folderpath&"dataForMe.txt")
end if
----------------------
Not recommended -- using the clipboard between Rev and other apps.
-----

Hope this gives you some options

Jim Ault
Las Vegas





More information about the use-livecode mailing list