Re: using a shell variable in an osascript line?
Re: using a shell variable in an osascript line?
- Subject: Re: using a shell variable in an osascript line?
- From: Axel Luttgens <email@hidden>
- Date: Fri, 27 Feb 2009 17:08:13 +0100
Le 27 févr. 09 à 16:35, René v Amerongen a écrit :
[...]
If I may insert another question here?
How do I get the result 'button returned:OK' back or the Cancelled
value?
Just check the return code of the osascript command: 0 if the user
clicks "OK", 1 if the user has canceled.
Of course, this assumes that the osascript command won't fail for any
other reason.
Alternatively, you might want to check the return code of a pipe
similar to this one:
osascript -e "..." | grep ":OK"
Note that osascript seems to write the result of the AppleScript
snippet to stdout, and to write messages related to AppleScript errors
to stderr.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden