Thursday, March 30, 2017

#1 2005-10-12 03:02:21 pm

julifos
Administrator
From: MalasaƱa, Madrid
Registered: 2002-11-20
Posts: 2014

How can I configure a script to launch at startup?

There are a couple ways to do this:

1) You can save the script as an application, and add it to the "Login Items" window in the "System Preferences" application.  This can be done by either dragging and dropping the script onto the "Login Items" window, or by clicking the "Add..." button in the window.
Programatically, you can use this code:

Applescript:

tell application "System Events"
   make login item at end with properties {path:"/path/to/app", hidden:false}
end tell

2) You can save your script as an application, and move it into the "Library > StartupItems" folder on your hard drive.  If the "StartupItems" folder doesn't exist, then you can create it, making sure that no spaces exist in its name.


Filed under: System

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.194 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)