Re: Obtaining the file path of a document in FreeHand MX
Re: Obtaining the file path of a document in FreeHand MX
- Subject: Re: Obtaining the file path of a document in FreeHand MX
- From: Brett Conlon/HU/AU/SonyDADC <email@hidden>
- Date: Wed, 29 Mar 2006 17:49:04 +1000
Hi Stan,
Thanks for your suggestion. I looked
at DocReport but I need a value inside the script that I can then use later.
The script I'm working on saves a PDF
to the desktop from FreeHand or Quark. Once the PDF is created I have to
figure out code that will wait until the new PDF file is created then copy
it to the job folder from which the FreeHand file was launched.
Here's the script I have built for Quark
which locates the correct PDF folder in my job folder from the active document:
tell
application "QuarkXPress"
set
QXFilePath to
file path of
document 1
end
tell
tell
application "Finder"
set
EnclosingFolder to
container of
(container of
QXFilePath)
set
PDFFolder to
first
folder of
EnclosingFolder whose
name contains
"PDF"
end
tell
I was hoping FreeHand had something
as simple as "...file path of..."
Now, if the DocReport could be cached
as a value *in* my script and the path value extracted from it, that would
be fine, but I believe you can only write the DocReport to a file, which
would then have to be opened and scanned and such... sounds more painful
than a finder search by the document name.
Cheers,
Coj
Stan Cleveland <email@hidden>
29/03/06 03:19 PM
|
To
| "email@hidden"
<email@hidden>
|
cc
| Brett Conlon/HU/AU/SonyDADC <email@hidden>
|
Subject
| Re: Obtaining the file path of a document
in FreeHand MX |
|
On 3/28/06 8:13 PM, email@hidden
wrote:
G'day,
Is there a way to get the file path of document 1 in FreeHand MX? The FH
Dictionary doesn't show anything.
I've tried a few "guess" attempts but nothing works.
Doing it the long way around I could get the name of document 1 then tell
Finder to look for it and check to see if it is open - probably slow too.
I'd have to account for duplicate names... sounds messy.
Still a bit messy, but a godsend nonetheless, is Freehand’s “DocReport”
command.
tell application “FreeHand MX”
DocReport in file “Path:To Some:ReportFile.txt”
DocReport document “MyFile.FH11” in file “Path:To Some:ReportFile_2.txt”
End tell
This generates a text file at the specified path that includes, among other
things, the path to the document, which you’ll find in the fourth paragraph.
By default, it reports on document 1, but you can specify any open document.
Stan Cleveland
Color Technology Inc.
Portland, Oregon
“G’night.”
_______________________________________________
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