Re: Newbie Quark Scripting critique
Re: Newbie Quark Scripting critique
- Subject: Re: Newbie Quark Scripting critique
- From: Shane Stanley <email@hidden>
- Date: Thu, 24 Oct 2002 08:33:52 +1000
On 24/10/02 3:31 AM +1000, Wallace, William,
email@hidden, wrote:
>
My first question is: Is there an easier, more elegant way to get the path
>
to the chosen file (excluding the actual filename)? The way I went about it
>
here works fine, I guess, but it seems kind of Rube Goldberg-y to me. Have I
>
missed the obvious?
Try this:
set theFile to choose file with prompt "pick a file... any file."
set thePath to theFile as string
set oldTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set pathToFile to (text from character 1 to text item -2 of thePath) & ":"
set AppleScript's text item delimiters to oldTIDs
tell application "Finder"
if not (exists folder (pathToFile & "EPSfiles")) then
>
>
Second question: I seem to recall there being a debate about nesting Tell
>
blocks like I have them. Was any consensus reached? Is this bad form? Am I
>
playing with fire here?
It's fine like it is.
>
PS Does anybody else find it really annoying that Quark feels the need to
>
launch itself when you open its dictionary in Script Editor, or if you
>
compile a script that references the Quark XPress application? Is it just
>
me?
Well, it can be annoying, but it's all in a good cause. QXP has a dynamic
dictionary -- what appears can depend on what XTensions are loaded. This is
a good thing; otherwise XTensions couldn't be scriptable.
--
Shane Stanley, email@hidden
_______________________________________________
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.