Re: Login Item
Re: Login Item
- Subject: Re: Login Item
- From: Nir Soffer <email@hidden>
- Date: Thu, 29 Jun 2006 01:00:19 +0300
On 28/06/2006, at 21:33, Nir Soffer wrote:
With this level of brokeness - how about this little hack: get the
application dock menu, get the "Open at Login" menu item, and
perform its selector - as if the user click it :-)
Unfortunately, I could not find how to get the default application
dock menu.
Anyway, its very easy to do this with few lines of AppleScript -
works nicely here on 10.4.6, I wonder if this script suffer from the
same problems mentioned earlier.
on |add login item with path|(posixPath)
tell application "System Events"
make new login item at end of login items with properties
{kind:"Application", path:posixPath}
end tell
end |add login item with path|
on |remove login item with path|(posixPath)
tell application "System Events"
set theMatches to login items whose path is posixPath
if theMatches is {} then return
delete item 1 of theMatches
end tell
end |remove login item with path|
-- simple test
|add login item with path|("/Applications/Mail.app")
|remove login item with path|("/Applications/Mail.app")
Best Regards,
Nir Soffer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden