Re: Add an item to OS X's "startup items"
Re: Add an item to OS X's "startup items"
- Subject: Re: Add an item to OS X's "startup items"
- From: Shane Stanley <email@hidden>
- Date: Fri, 13 Dec 2002 09:28:50 +1100
On 13/12/02 3:29 AM +1000, julifos, email@hidden, wrote:
>
I've seen that "startup items" in OS X are "stored" as references in a file
>
called "loginwindow.plist", and I don't know if scripting this file will
>
result as well as adding an item manually in system preferences...
>
>
Anyway, this xml file contains for each item a field called "<data>",
>
which... What is this? How can I reproduce a "login item" field to write to
>
"loginwindow.plist"? Any workaround?
If you're running 10.2, you can script login items directly via System
Events:
set theApp to choose file of type {"APPL"}
-- path property of login item requires POSIX path
set appPath to POSIX path of theApp
tell application "System Events"
make login item at end with properties {path:appPath, hidden:false}
end tell
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.