• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Display dialog and select button after so long
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display dialog and select button after so long


  • Subject: Re: Display dialog and select button after so long
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 25 Aug 2011 14:14:40 -0700

Hey there, on Thu Aug 25 12:46:28 2011, Ball, Dan wrote the following interesting missive:

on shutdownscript(this_anchor)
tell application "Finder" to activate
tell application "System Events"
tell process "Finder"
click menu item "Shut DownĊ " of menu 1 of menu bar item "Apple" of menu
bar 1
end tell
end tell
delay 9
tell application "System Events"
tell process "loginwindow"
activate
click checkbox 1 of window 1
click button "Shut Down" of window 1
end tell
end tell
end shutdownscript

What am I missing?  Why not these?

on shutdownscript()
tell application "System Events" to shut down
end shutdownscript

Similarly,

on restartscript()
tell application "System Events" to restart
end restartscript

-- Michelle

--
"Should any  political party attempt to abolish social security, unemployment insurance,  and eliminate labor laws and farm programs, you would not hear of that party  again in our political history. There is a tiny splinter group, of course,  that believes that you can do these things. Among them are a few Texas oil  millionaires, and an occasional politician or businessman from other areas.  Their number is negligible and they are stupid."
President Dwight D.  Eisenhower, 1952

 _______________________________________________
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

References: 
 >Re: Display dialog and select button after so long (From: "Ball, Dan" <email@hidden>)

  • Prev by Date: Re: Finder Selection Bug in Lion
  • Next by Date: Re: Display dialog and select button after so long - Final Code
  • Previous by thread: Re: Display dialog and select button after so long
  • Next by thread: Re: Display dialog and select button after so long - Final Code
  • Index(es):
    • Date
    • Thread