Re: "tell application" without starting application?
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.