Re: Path to Quark...
Re: Path to Quark...
- Subject: Re: Path to Quark...
- From: Hans Haesler <email@hidden>
- Date: Wed, 1 Dec 2004 09:19:22 +0100
On Tue, 30 Nov 2004, Stefan Eriksson wrote:
>I just found a small script that searches for a specific xtension for
>QxP6 and am curious how to get a path to a specific application, in this
>case QxP...
>Script so-far looks like, thx whoever made it !
Stefan,
the author is David Wadson. But I guess that you missed my reply.
That's why I'll Cc this message to you.
When QXP 6.x is running then this returns the path to QXP 6.x:
---
tell application "QuarkXPress 6.5"
set QXPapp to (path to) as string
end tell
-->"Mac_OS_X:Applications:QuarkXPress 6.5:QuarkXPress 6.5.app:"
To get the path to the program folder of QXP 6.x:
---
tell application "QuarkXPress 6.5"
set QXPapp to (path to) as string
set AppleScript's text item delimiters to {":"}
set QXPfolder to (text items 1 thru -3 of QXPapp) as string
set AppleScript's text item delimiters to {""}
end tell
QXPfolder
-->"Mac_OS_X:Applications:QuarkXPress 6.5"
Finally, to test if an certain XTension is in the folder "XTension"
don't use the script you've posted, but, rather:
---
tell application "QuarkXPress 6.5"
set QXPapp to (path to) as string
set AppleScript's text item delimiters to {":"}
set QXPfolder to (text items 1 thru -3 of QXPapp) as string
set AppleScript's text item delimiters to {""}
end tell
try
alias (QXPfolder & ":"QX-Drag&Drop")
tell application "QuarkXPress 6.5"
display dialog "QX-Drag&Drop is installed" buttons ¬
"Abort" default button 1 with icon 0 giving up after 15
end tell
error number -128
on error
-- the offending XTension is not in the XTension folder
end try
---
Regards,
Hans
---
Hans Haesler <email@hidden>
_______________________________________________
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