Re: Executing an Applescript
Re: Executing an Applescript
- Subject: Re: Executing an Applescript
- From: Cameron Simpson <email@hidden>
- Date: Sat, 31 Dec 2011 10:02:53 +1100
On 29Dec2011 22:28, Ken Thomases <email@hidden> wrote:
| On Dec 29, 2011, at 9:57 PM, Daniel . wrote:
| > On Dec 29, 2011, at 6:32PM, Jeremy Huddleston wrote:
| >> Right. Because quartz-wm is executed as the last thing in xinitrc. If you want this to be run in the background, you need to use 'osascript &' rather than 'osascript'
| >
| > Using 'osascript &' broke it. Won't do anything now.
|
| Put the '&' after the '<<"__END__"', not before.
Or... you don't need a here document. Example from
http://www.cskk.ezoshosting.com/cs/css/bin/term:
osascript \
-e 'tell app "'"$app"'"
set myterm to ('"$itermterm"')
tell myterm
set mysession to (make new session at the end of
sessions)
tell mysession
set name to "'"$title"'"
exec command "'"$runme"'"
end tell
end tell
end tell'
Also, of course, you can make a standalone AppleScript executable by
starting it with:
#!/usr/bin/osascript
... raw ApleScript here ...
just like an other interpreted language on UNIX systems.
There's no need for these indirect HERE document shenanigans.
Cheers,
--
Cameron Simpson <email@hidden> DoD#743
http://www.cskk.ezoshosting.com/cs/
If you give me six lines written by the most honest man, I will find
something in them to hang him. - Cardinal Richilieu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden