[Pythonmac-SIG] using appscript to add a login item?

Drew Houston drew at getdropbox.com
Thu Dec 4 02:04:29 CET 2008


This bit of Applescript does it:

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

Not 100% sure how that translates to appscript though.

Drew

Bill Janssen wrote:
> I'm trying to add a login item in an installer, and I thought using
> appscript would be the simplest way.
>
>   
>>>> from appscript import *
>>>> a = app("System Events")
>>>> a.login_items()
>>>>         
>
> Sure enough, a display of items.  But how do I create a new one and add
> it?
>
> Bill
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>   


-- 
Drew Houston
CEO, Dropbox
617.697.6795 (m)



More information about the Pythonmac-SIG mailing list