Re: Save Quark 6 files as Quark 5
Re: Save Quark 6 files as Quark 5
- Subject: Re: Save Quark 6 files as Quark 5
- From: Hans Haesler <email@hidden>
- Date: Wed, 24 Nov 2004 22:54:04 +0100
On Wed, 24 Nov 2004, William Hopkins wrote:
>I've been trying to use this script to determine
>wether files dropped into a folder are Quark 6 files
>if so, the files are opened in Quark and they are
>supposed to be saved to Quark 5. But I can't get the
>files to save after I open them. Any suggetions?
William,
there are several problems with your code. The major one is:
you don't provide a name for the document to save. I guess that
'PSTempOut' is a folder.
You don't need to use 'as file specification'.
We've been told that it's better to use "System Events"
for getting the processes. Nevertheless, the list of the
names of the processes contains the item "QuarkXPress"
(and not 'application "QuarkXPress"').
Your code has two 'tell "XPress"' blocks inside of the
'tell app "Finder"' block. Some people will say that this
doesn't matter. But I don't like it. I think it is better
to use 'info for' for getting the file type.
This works for me:
---
on adding folder items to this_folder after receiving added_items
tell application "System Events"
set procList to name of every process
end tell
if "QuarkXPress" is not in procList then
tell application "QuarkXPress"
activate
end tell
end if
repeat with x in added_items
set FileType to file type of (info for file (x as string))
if FileType = "XPRJ" then
tell application "QuarkXPress"
activate
open x
set docName to name of document 1
set filePath to "Design06X:Users:Admin:Desktop:PSTempOut:docName"
save document 1 in filePath version vers 50
close document 1
end tell
else
display dialog "Wrong file type"
end if
end repeat
end adding folder items to
---
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