• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: starting iCal and Address Book iconified, with py-appscript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: starting iCal and Address Book iconified, with py-appscript


  • Subject: Re: starting iCal and Address Book iconified, with py-appscript
  • From: Bill Janssen <email@hidden>
  • Date: Tue, 26 Jan 2010 10:17:13 PST
  • Comments: In-reply-to has <email@hidden> message dated "Mon, 25 Jan 2010 14:06:23 -0800."

has <email@hidden> wrote:

> Bill Janssen wrote:
>
> > I've been trying to quietly start up Address Book and iCal from a
> > background process, on Leopard, using py-appscript.  The code I'm using
> > is this:
> >
> >         app = appscript.app("Address Book")
> >         if not app.isrunning:
> >             app.launch()
> >
> > which I thought would open them quietly ("launch" instead of "activate").
>
> isrunning is a method, not a property, so needs parentheses after it. As it stands, your conditional expression will always return False. [1]

Ah, that's what's going on.  I then make a call on it, and it's
activated to handle that call.  Thanks.

> Also, a more robust approach would be to use the new 'hide' argument, like this:
>
> 	app = appscript.app("iCal", hide=True)

OK, thanks.

Bill
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: starting iCal and Address Book iconified, with py-appscript (From: has <email@hidden>)

  • Prev by Date: Re: Applescript book recommendation
  • Next by Date: Re: Applescript and referring to a folder
  • Previous by thread: Re: starting iCal and Address Book iconified, with py-appscript
  • Next by thread: How to move messages in mail.app
  • Index(es):
    • Date
    • Thread