Re: Quark 6 Doc File Path = Temporary Items?
Re: Quark 6 Doc File Path = Temporary Items?
- Subject: Re: Quark 6 Doc File Path = Temporary Items?
- From: Luca BASSINI <email@hidden>
- Date: Tue, 5 Oct 2004 15:21:34 +0200
Jason,
there is a UI scripting workaround you can find below:
------------------------------------------------------------------------
--------------------------------
The UI script picks up the file path from Dejavu Preference from
QuarkXPress 6.0 application.
Before you execute this script, here are a few things you need to do :
1. UI scripts can only run on Panther OS (X.3) or higher.
Note : To make them run on Jaguar (X.2.3 or higher), you will need to
install a patch that can be downloaded from Apple website.
2. Also you will need to set 'Enable access for assistive devices' in
the 'Universal Access' pane of the Systems Preferences.
With the above settings in place, you can run UI Scripts.
Now the settings that is required for the script to work effectively :
1. In QuarkXPress preferences, select the File List pane, enable Show
Full Path.
It will be better if you can increase the Number of files to a maximum
of 9. This helps if there are large number of documents opened in
QuarkXPress.
This is the script that will retrieve the network file path :
tell application "QuarkXPress"
activate
tell project 1
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set fileName to name
set FilePath to my getFilePath(fileName)
display dialog "Path is : " & FilePath
set AppleScript's text item delimiters to oldDelims
end tell
end tell
on getFilePath(fileName)
tell application "System Events"
tell process "quarkxpress"
set frontmost to true
tell menu " " of menu item "Open" of menu
"File" of menu bar item "File" of menu bar 1
set countInDejavu to count of menu item
set ret_filePath to ""
if (countInDejavu is greater than 2)
then
repeat with counter from 3 to
countInDejavu
tell menu item counter
set
ret_filePath to name
set
lastTextitem to last text item of ret_filePath
tell
application "QuarkXPress"
set
lastTextitem to coerce lastTextitem to string
end tell
end tell
if (lastTextitem is
equal to fileName) then
exit repeat
else
set
ret_filePath to ""
end if
end repeat
return ret_filePath
end if
end tell
end tell
end tell
end getFilePath
Although the script runs flawlessly, it do has a few limitations as
listed below :
1. If the file path of a document does not show in dejavu, then the
script will fail to return its network file path.
2. You must make sure that two documents with the same name are not
open in QuarkXPress.
In this case, the script will return the file path of the document that
is listed first in dejavu.
------------------------------------------------------------------------
--------------------------------------
Yes, you can copy the docs locally, but... I think it's not a valid
workaround if you need to know the original location of a document (i
mean: if you need the path of a document that stays on a server, i'm
presuming you need to get that info!!!)
hope this help,
luca
On 05/ott/04, at 15:03, Jason Bourque wrote:
Luca,
Whats the work around? Copy them to the local drive?
Thanks,
Jason
On 10/5/04 8:55 AM, "Luca BASSINI" <email@hidden> wrote:
Hi Jason,
this is a well-known QuarkXPress 6.x bug!!! It always occurs when the
document is on a server or a network... One day, probably, they will
fix... probably...
Luca
On 05/ott/04, at 14:49, Jason Bourque wrote:
Hello,
I have a script that is returning a path to the "Temporary Items"
instead of
the real file path. What gives? The document isn't even modified. Is
it
because it is part of a book?
tell application "QuarkXPress 6"
tell document 1
set vDocPath to file path
End
End
Thanks,
Jason Bourque
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
Luca Bassini
Co-founder and AppleScript GURU
Emerasoft - "Desktop Publishing for the rest of us"
http://www.emerasoft.com
corso Siracusa, 25 - 10136 Torino
Cell +39 320 6553814 Fax +39 011 3710371
_______________________________________________
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