Re: Adding something to the current user's login items.
Re: Adding something to the current user's login items.
- Subject: Re: Adding something to the current user's login items.
- From: David Remahl <email@hidden>
- Date: Sun, 23 Feb 2003 03:05:37 +0100
AppleScript.
This is some code verbatim from iChatStatus (it requires the program
that should be added to be running):
tell application "System Events"
if (count of (login items whose name is equal to "SetiChatStatus")) is
not 0 then
return "Already installed"
end if
set the_file to (file of application processes whose name is equal to
"SetiChatStatus")
if (count of the_file) is 0 then
return "Couldn't locate application"
end if
end tell
-- this is to resolve a name space conflict
set the_path to POSIX path of first item of the_file
tell application "System Events"
make new login item at the end of login items with properties
{path:the_path}
end tell
/ Rgds, David
lvrdagen den 22 februari 2003 kl 21.41 skrev Dan Bernstein:
>
Hi.
>
>
What's the best way to add an item (my application's "helper") to the
>
current user's login items?
>
>
TIA,
>
-- Dan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.