Re: Display dialog and select button after so long
Re: Display dialog and select button after so long
- Subject: Re: Display dialog and select button after so long
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 25 Aug 2011 22:13:44 +0200
Le 25 août 2011 à 21:46, Ball, Dan a écrit :
We can't extract something from a returned result more than once.
You tried to do that twice so you failed.
>
> tell application "Finder" to activate
> tell application "System Events"
> tell process "Finder"
> display dialog "Please select your option!" & "
> Will timeout in 10 seconds!" buttons {"Restart", "Shutdown", "Cancel"}
> default button 2 with icon 0 giving up after 10
set the_result to the result
set giveUp to (gave up of the_result)
if giveUp is true then my shutdownscript("ShutdownScript")
--STUCK HERE
set the user_choice to the button returned of the_result
> if the user_choice is "Restart" then
> my restartscript("RestartScript")
> return false
> else if the user_choice is "Shutdown" then
> my shutdownscript("ShutdownScript")
> return false
> else if the user_choice is "Cancel" then
> return false
> end if
> end tell
> end tell
Yvan KOENIG (VALLAURIS, France) jeudi 25 août 2011 22:13:38
_______________________________________________
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