Link to home
Start Free TrialLog in
Avatar of ravenbio
ravenbio

asked on

Scripting the finder with Applescript in OS X (10.3.x)

In OS X (10.3) I cannot figure out how to write an Applescript to restart an unattended computer (at a scheduled time). Using the "restart" command (as in OS 9) will only bring up the restart/shutdown dialog box.  I am not sure how to tell the finder to ignore the dialog.
Avatar of mbarkdull
mbarkdull

The way I would recommend is send the following command to the terminal as sudo.

Be warned:  Scripting a Super User password is not recommended by many experts.

sudo shutdown -r now
********

Not exactly sure how AppleScript handles terminal commands and input to it.  I'll see if I can find out.  It would be nice if the password could be encrypted in the script as well.
Avatar of ravenbio

ASKER

Unfortunately, I don't have a clue as to how I would script the terminal...
ASKER CERTIFIED SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Actually, that link is quite useful, thanks!