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: "Ball, Dan" <email@hidden>
- Date: Thu, 25 Aug 2011 16:08:28 -0400
- Acceptlanguage: en-US
- Thread-topic: Display dialog and select button after so long
Stan,
Ok it didn't work at first, but all of sudden it seems to be
working....will keep testing it. Thanks for getting me straight on this.
-Dan
On 8/25/11 3:55 PM, "Stan Cleveland" <email@hidden> wrote:
>On Aug 25, 2011, at 12:46 PM, Ball, Dan wrote:
>
>> Ok......I'm stuck again. Please help...
>>
>> Its looking for a button choice.....if it gives up it shouldn't look
>>for a
>> user_choice. About 8 lines down from the top....STUCK HERE is where I
>>am
>> stuck. Tried putting else but wouldn't take.
>
>Hi Dan,
>
>Try this:
>
>tell application "Finder" to activate
>tell application "System Events"
> tell process "Finder"
> set dialogResult to (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)
> if gave up of dialogResult then
> my shutdownscript("ShutdownScript")
> else
> set the user_choice to the button returned of dialogResult
> 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 if
> end tell
>end tell
>
>Stan C.
>
_______________________________________________
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