Re: How to make scripts reference multiple revs of an app
Re: How to make scripts reference multiple revs of an app
- Subject: Re: How to make scripts reference multiple revs of an app
- From: Ken Tozier <email@hidden>
- Date: Sat, 28 Feb 2004 23:57:18 -0500
On Feb 28, 2004, at 11:44 PM, Robert Poland wrote:
I've been scripting for a long time now but have never found a way to
reference multiple versions of an application. For example: Say you
need to write a script that works with three versions of QuarkXPress,
there are only two options as far as I can tell:
1. Recompile the script on each machine where it will be used
2. Rename Quark on all target machines to the name you used in your
script.
Is there a more elegant way to reference an app say by it's creator
code or something?
Something like:
tell application whose creator type = "XPR3"
-- do amazing stuff here
end
Always been curious about this,
Ken
How about something like;
tell application "Safari"
set x to version
end tell
x
The problem isn't so much getting the version number as having to
specify the application name exactly in:
tell application "<exact app name here>"
What I'm curious about is if there is a way to be a little looser with
the app name like
tell application {"QuarkXPress", "QuarkXPress 3.32r5", "QuarkXPress."}
yadda, yadda, yadda
or
tell application whose name starts with "QuarkXPress"
so scripts would run without recompiling on machines that may have an
oddly named Quark
_______________________________________________
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.