Recipe for Script Editor to Revolution app communication
Posted: Sun Mar 23, 2008 2:41 am
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.
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.