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: "Mark J. Reed" <email@hidden>
- Date: Fri, 27 Feb 2009 11:28:19 -0500
On Fri, Feb 27, 2009 at 11:08 AM, Axel Luttgens
<email@hidden> wrote:
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.
if osascript -e ' tell application "Finder" to display dialog "OK?" ' >/dev/null 2>&1; then
# user clicked OK
else
# user clicked Cancel or something else went wrong
fi
--
Mark J. Reed <
email@hidden>
_______________________________________________
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