• 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: "tell application" without starting application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "tell application" without starting application?


  • Subject: Re: "tell application" without starting application?
  • From: Michael Stillwell <email@hidden>
  • Date: Thu, 28 Nov 2002 16:29:32 +1100

On Thursday, Nov 28, 2002, at 13:08 Australia/Melbourne, Rob Jorgensen wrote:

Here's a more direct method that doesn't require 'contains'.

tell application "Finder" to set itStatus to exists process "iTunes"

if itStatus is true then
tell application "iTunes"
-- doThis()
end tell
else
display dialog "iTunes is not running"
end if

Many thanks for all the great replies--I've shortened my is_running() function considerably after reading them. However, after implementing the changes, I still had the problem I started with (!), which was that the presence of a line like

tell application "iTunes"

in a script (irrespective of where it occurred in the script) started iTunes running! The problem, though, turned out to be due to some sort of bug in /usr/bin/osascript--when the script is run by the Script Editor this didn't happen. So, I've filed a bug report with Apple.





Michael

* * *
http://beebo.org
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: "tell application" without starting application? (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: Re: "tell application" without starting application?
  • Next by Date: Re: "tell application" without starting application?
  • Previous by thread: Re: "tell application" without starting application?
  • Next by thread: Re: "tell application" without starting application?
  • Index(es):
    • Date
    • Thread