8

Is it possible to force an AppleScript to activate when I log in?

11

If you save the Apple Script as an application, then go to System Preferences -> Users -> Login Items, you can add the application there, and it will run on login.

enter image description here

2

~/Library/LaunchAgents/login_test.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>login_test</string>
    <key>ProgramArguments</key>
    <array>
        <string>osascript</string>
        <string>/Users/username/Desktop/test.scpt</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>
1

You can also use Script Timer for this. It is $12, but it is a very useful little utility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .