Detecting and Invoking Quark Versions
Detecting and Invoking Quark Versions
- Subject: Detecting and Invoking Quark Versions
- From: email@hidden
- Date: Wed, 13 Oct 2004 08:19:47 -0400
*Question 1*: I have this little script here I run in OS X 3.5 to look for currently running Quark versions:
tell app "System Events"
set procL to every process whose creator type is "XPR3"
repeat with p in procL
try
display dialog (file of p) as text
-- If (file of p) equals some predetermined path then I've found what I'm looking for and exit repeat.
on error errmsg
display dialog errmsg
end try
end repeat
end tell
If I have Quark 4 and no other Quark versions running, I get what I expect, something like "Macintosh HD:Applications (Mac OS 9):QuarkXPress 4.1:QuarkXpress", and likewise if I have Quark 5 running and no other Quarks I get the correct path to the Quark 5 application.
However, if I have them both running, it loops twice, but both times I get the path for whichever process was started first, e.g., if I start Quark 5, then start Quark 4, and then run this script, then both times the Quark 5 path is displayed. Can anyone please shed any light on this?
*Question 2*: Once I've found the Quark process I'm looking for, what is the correct way of opening the document in the correct process, seeing that more than one process may have the same name? (and Classic vs. OS X - is the syntax the same?)
tell app "System Events" ...or... tell app "Finder"
tell process p ... or... tell process (name of p) ...or... ???
open alias myDoc
end tell
end tell
Thanks very much...
- Dan
_______________________________________________
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