Anomalous scripting behaviour

G

Gnarlodious

Works:

tell application "System Events" of machine "eppc://Gnarlodious-Cube.local"
to exists process "Microsoft Entourage"

Doesn't:

tell application "System Events" of machine "eppc://Gnarlodious-Cube.local"
to exists process "Entourage"


Compare that to this:


Works:

ignoring application responses
tell application "Entourage" of machine "eppc://Gnarlodious-Cube.local"
to quit
end ignoring

Doesn't:

ignoring application responses
tell application "Microsoft Entourage" of machine
"eppc://Gnarlodious-Cube.local" to quit
end ignoring


Any explanation for this anomalous behaviour?

-- Gnarlie
<http://www.Gnarlodious.com/OSX/AppleScript/AppleScript.html>
 
P

Paul Berkowitz

Works:

tell application "System Events" of machine "eppc://Gnarlodious-Cube.local"
to exists process "Microsoft Entourage"

Doesn't:

tell application "System Events" of machine "eppc://Gnarlodious-Cube.local"
to exists process "Entourage"


Compare that to this:


Works:

ignoring application responses
tell application "Entourage" of machine "eppc://Gnarlodious-Cube.local"
to quit
end ignoring

Doesn't:

ignoring application responses
tell application "Microsoft Entourage" of machine
"eppc://Gnarlodious-Cube.local" to quit
end ignoring


Any explanation for this anomalous behaviour?


You should probably ask this on the Apple-Script Users list, Gnarlie.

I get the same thing. As far as 'application "Application Name" ' goes, you
usually have to use the name of application file. However, there are various
kinds of name that the OS uses for applications and processes. For example,
if you try a 'choose application' you'll see "Microsoft Entourage" show up
as many times as you have versions and copies. But if you press cmd-opt-esc
for Force Quite, you'll see plain "Entourage" show up. I've forgotten what
that kind of name is called, but every app has this type too. With one-word
names it's the same, but with longer app names there really are two kinds.
It appears that Remote Apple Events (accessed by 'of machine "eppc://"'
command) uses the short name - which is inconsistent with normal AppleScript
behavior, but System Events process names are the same as always (which
makes sense).

I think it's most unlikely that this has anything to do with how Entourage
developers have implemented it (aside from the fact that there's a short
form at all), but rather how Apple engineers have implemented the 'of
machine "eppc://"' thing for remote scripting to use the short form. I don't
know why they've done it that way - it seems buglike to me. I'd ask on
AS-Users list and maybe file a bug with Apple.

--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.
 
Top