Or if you're running the bash shell, it looks like this:
$ exec osascript <<EOF >tell application "Safari" >activate >end tell [ctrl-d]
I guess in the bash shell, ctrl d is the EOF. At any rate, typing \EOF produces no visible result.
Nifty
But after I type "\EOF", I just keep getting more prompts. On Jul 10, 2004, at 4:22 PM, Ken Ray wrote:
Kaveh,
Here's a way to do it interactively from Terminal. The following simple script activates Safari...
1) Open Terminal.
2) At the prompt type the following and hit return:
exec osascript <<\EOF
3) You should get a new ? prompt. Type each line of the script on its own
line and hit return. A new ? will show up for each line. When you have
finished typing the script, it should look like this:
? tell app "Safari" ? activate ? end tell ?
4) Now at that final ? prompt, type "\EOF" and hit return. Terminal will
execute the AppleScript and activate Safari. So your Terminal window should
look like this when you're done (this is from my Mac):
[PowerMacG4:~] kenray% exec osascript <<\EOF ? tell app "Safari" ? activate ? end tell ? \EOF [Process completed]
Note that this "kills" your terminal window (the titlebar says "Completed
Command"), so you'll need to start a new shell window for other Terminal
commands after this has been executed.
HTH,
Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kaveh Bazargan Sent: Saturday, July 10, 2004 4:43 PM To: How to use Revolution Subject: Re: Sending AppleScript from Terminal to RR
At 3:27 pm -0600 10/7/04, Dar Scott wrote:from TerminalOn 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 Transcriptto RR?
I'm having a little trouble picturing what you are doing.
Don't blame you. I haven't given much details! Thanks for your time. It's very informative.
the results
If your Revolution app runs the scripts with shell() thenwill be returned when the shell script returns.
Correct. But I decided to go back to sending an AppleScript to Terminal to run a process. The reason is that I want to see the shell while the process is running. shell() doesn't show any of this I think.
I have a number of buttons in the stack. Each start a process in Terminal. I need a clear sign that the process is finished (although I can watch the shell window too), so that I know I can press the next button. This is actually part of a demonstration, otherwise I would just use the shell window.
I have now managed to send an AppleScript back to RR, by getting Terminal to open an AppleScript app. The script actually highlights the button I pressed, so a clear indication that it is finished.
The script is just one ApplesScript so there is not much to change to go cross platform. --
-------------- Kaveh Bazargan http://www.focalimage.com/ http://www.holographer.org/ _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
