Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

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.
0
ravenbio
Asked:
ravenbio
  • 2
1 Solution
 
mbarkdullCommented:
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.
0
 
ravenbioAuthor Commented:
Unfortunately, I don't have a clue as to how I would script the terminal...
0
 
brettmjohnsonCommented:
> Unfortunately, I don't have a clue as to how I would script the terminal...

Ah, but Dr John Trimmer does:

http://www.osxfaq.com/Tutorials/as_unix/index2.ws

0
 
ravenbioAuthor Commented:
Actually, that link is quite useful, thanks!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now