Page 1 of 1

Is it possible to shutdown your computer through a button?

Posted: Thu May 31, 2007 6:36 pm
by Paul D
Im searching through the Language reference and the user guide but I dont see a command or a way to execute a computer shutdown on a button click. Maybe I am missing something?

Posted: Thu May 31, 2007 10:35 pm
by Mark
Dear Paul,

Windows XP:
get shell("shutdown -s")

Mac OS 9 and X, AppleScript:
tell application "Finder" to shut down

or "embedded" in Transcript:
do "tell application" && quote & "Finder" & quote && "to shut down" as AppleScript

Unix, Linux and Mac OS X:
get shell("shutdown -h")

Best regards,

Mark

Posted: Fri Jun 01, 2007 1:22 pm
by Paul D
How bout one for windows 2000?