• 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
Best practice for activation of another application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best practice for activation of another application


  • Subject: Best practice for activation of another application
  • From: Daniel Jalkut <email@hidden>
  • Date: Sat, 08 Oct 2005 12:19:08 -0400


When I write an AppleScript that needs to display a dialog in another application, I always explicitly activate that appliation first:


tell application "iCal"
    activate
    display dialog "hello"
end tell

I've noticed that some scripts leave out the activate, and rely on the host application to decide whether the frontmost application is switched out or not (by controlling the execution flags of the AppleScript).

I can see arguments for both practices. Explicit activation means that a particular user experience will always be obtained, while leaving the activation out could be perceived as less intrusive to a user or application who doesn't want to have their focus "hijacked."

Any opinions?

Daniel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Mount a Disk Image with Password
      • From: Jason Bourque <email@hidden>
    • Re: Best practice for activation of another application
      • From: Paul Berkowitz <email@hidden>
    • Re: Best practice for activation of another application
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: long shot..
  • Next by Date: Re: Best practice for activation of another application
  • Previous by thread: Re: The Save command will replace, without asking
  • Next by thread: Re: Best practice for activation of another application
  • Index(es):
    • Date
    • Thread