This is what worked for me. I am running Leopard (10.5.2) on a Power PC, and using Revolution 2.8.1.
1. Open Revolution
2. File / New Mainstack
3. Object / Stack Script
4. enter the following script
on barklikeadog additionalStuff
return "arf arf" && the seconds && additionalStuff
end barklikeadog
5. Apply, close the stack script
6. Object / Stack Inspector
Name: AppleEventCatcher
7. close the inspector
8. File / Save
9. File / Standalone Application Settings
10. Windows
Build for: (de-select the checkbox)
11. close the Standalone Application Settings window
12. File / Save
13. File / Save As Standalone Application
14. Quit Revolution
15. in the Finder, go to the newly created Mac application "AppleEventCatcher" and with the control key down, click on the application. Select "Show Package Contents"
16. Go to Contents / Resources / Revolution.rsrc and change the name of that file to AppleEventCatcher.rsrc
17. close the Show Package Contents window
18. Open Apple's Script Editor.
19. In the script window enter the following script:
property thescript : []
on run
copy "barklikeadog beg" to thescript
tell application "asdfgh"
activate
do script thescript
end tell
end run
20. Don't press the Compile button.
21. File / Save and it will ask you where asdfgh is located. Select the newly modified Mac application "AppleEventCatcher"
22. Press the Run button
23. The Result window should display something like:
"arf arf 1206236082 beg"
From what I can see, the communication style I am using does not permit more that one word to be sent from the Script Editor to the application. My way around that is to URLencode what I wish to send and then URLdecode in the application. I don't know what kinds of payload limits there are going to and coming from the application.
calling a RR script form Applescript
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2
- Joined: Mon Aug 27, 2007 9:33 pm
- Contact:
Re: calling a RR script form Applescript
OK, so now that LiveCode produces no .rsrc file, how do I get this working?
Re: calling a RR script form Applescript
What exactly has this to do with this 5 year old thread?rrBUSS9EE wrote:OK, so now that LiveCode produces no .rsrc file, how do I get this working?

Sorry, no idea what you are after...

Re: calling a RR script form Applescript
Hi,
Manually copy the file /Applications/LiveCode Community 6.x.x.app/Contents/Resources/LiveCode.rsrc to your standalone and continue from there.
Kind regards,
Mark
Manually copy the file /Applications/LiveCode Community 6.x.x.app/Contents/Resources/LiveCode.rsrc to your standalone and continue from there.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: calling a RR script form Applescript
AHA! 
Your message contains 7 characters. The minimum number of characters you need to enter is 10.

Your message contains 7 characters. The minimum number of characters you need to enter is 10.
Re: calling a RR script form Applescript
Thanks Mark...Mark wrote:Manually copy the file /Applications/LiveCode Community 6.x.x.app/Contents/Resources/LiveCode.rsrc to your standalone and continue from there.
But something is still quite wrong. I can now compile an AppleScript, but evaluate <expression> is failing when I call it in a Standalone, however not when I call it in LiveCode. I get "Error parsing expression".
Again... works perfectly in a stack under LiveCode, same stack as a standalone... nada. Very frustrating!
My expression looks like this:
executeTach("Command Unit 1")
This function in the stack looks up "command Unit 1" in an sqLite DB, opens a socket, starts a timer, and writes a string to the socket. When the timer message comes in it closes the socket. Thats it!