Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Restarting a remote Mac via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restarting a remote Mac via AppleScript
Authored by: Tom Robinson on Aug 04, '03 03:46:59PM

I'm not trying to be picky, but under AppleScript and OS X you should be talking to System Events rather than the Finder about global commands like shut down, sleep, and restart.

If you look in the Finder's dictionary these now appear under the Legacy suite, and the Finder just forwards them to the appropriate app.

Cheers



[ Reply to This | # ]
Restarting a remote Mac via AppleScript
Authored by: vonleigh on Aug 04, '03 08:12:35PM

I thought so too, it's not a task for the finder, but I wasn't able to find the proper syntax. Can you provide code?

v



[ Reply to This | # ]
Restarting a remote Mac via AppleScript
Authored by: Tom Robinson on Aug 05, '03 05:17:39AM

Just replace 'Finder' with 'System Events':

tell application "System Events" to sleep

Cheers



[ Reply to This | # ]