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

Bill Janssen janssen at parc.com
Thu Dec 4 02:03:39 CET 2008


Bill Janssen <janssen at parc.com> 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

app("System Events").login_items.end.make(
    new=k.login_item,
    with_properties={
        k.hidden: False,
        k.name: "UpLibJanitor",
        k.path:         "/Applications/Utilities/UpLibJanitor.app"
        }
    )



More information about the Pythonmac-SIG mailing list