• 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: Detecting and Invoking Quark Versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Detecting and Invoking Quark Versions


  • Subject: RE: Detecting and Invoking Quark Versions
  • From: Kumar Shailove <email@hidden>
  • Date: Wed, 13 Oct 2004 19:09:59 +0530

Do you really want to determine these things at the runtime? I mean if you already know the location of different versions of an applications on the disk, you can specify the path in the script itself and it will work.

property QXPLocation : "Panther:Applications:QuarkXPress61:QuarkXPress Passport.app"    -- the absolute path of your apps

tell application QXPLocation

-- your statements.

end tell

 

Good Luck!!!

*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

  • Prev by Date: Script not setting finder label?
  • Next by Date: Re: Corce alias with Unicode (Japanese) to string fails
  • Previous by thread: Detecting and Invoking Quark Versions
  • Next by thread: Script not setting finder label?
  • Index(es):
    • Date
    • Thread