Solved

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

Posted on 2004-08-09
4
415 Views
Last Modified: 2010-04-29
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
Comment
Question by:ravenbio
  • 2
4 Comments
 

Expert Comment

by:mbarkdull
ID: 11758888
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
 

Author Comment

by:ravenbio
ID: 11759023
Unfortunately, I don't have a clue as to how I would script the terminal...
0
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 250 total points
ID: 11759338
> 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
 

Author Comment

by:ravenbio
ID: 11759976
Actually, that link is quite useful, thanks!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question