Re: "running" property causes Script Editor nervous breakdown
Re: "running" property causes Script Editor nervous breakdown
- Subject: Re: "running" property causes Script Editor nervous breakdown
- From: Christopher Nebel <email@hidden>
- Date: Sun, 27 Apr 2008 13:00:30 -0700
On Apr 25, 2008, at 4:14 PM, Joe wrote:
One little line of script is causing really weird problems in Script
Editor.
if not application "Safari" is running then tell application
"Safari" to activate
Saved as a compiled script on the desktop.
Double-clicking the script to open it starts up both Safari and
Script Editor, but opens no windows in either application. Double-
clicking the script once again opens a window with the script's text
visible, but the window is named "Window" not "test" or "test.scpt"
as the file is named.
First off, the apparent window misbehavior just sounds weird and is
presumably a bug. We'll look into that, but a bug report from you
never hurts.
As for it "inappropriately" launching Safari, it's behaving exactly as
expected. When displaying a script (which has to be done when you
open one, naturally), a "tell <app>" will attempt to get the
terminology for that application, because that's what "tell"
statements are defined to do. Since Safari claims to have dynamic
terminology, it gets launched in order to do that. That's kind of a
bug in Safari, since it doesn't really have dynamic terminology, it
just says it does. You can work around the problem by not using a
"tell":
activate application "Safari"
--Chris Nebel
AppleScript Engineering
P.S.: For anyone who didn't know already, the "running" property of
applications is a new feature in Leopard.
_______________________________________________
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