Re: Request help
Re: Request help
- Subject: Re: Request help
- From: Walter Ian Kaye <email@hidden>
- Date: Fri, 18 Jun 2004 03:45:57 -0700
At 10:53a +0530 06/18/2004, BADRINATH, NANDINI didst inscribe upon an
electronic papyrus:
I have an application called QuarkXPress.with the open command in
applescript im able to open a file
but wht i need to do is open files in a folder one by one.ie open
one file thn close it again do the same on next file in tht
folder.
How do i do this?could you please give me a solution for this?how to
write apple script for this...
Something like the following:
set folderPath to "Disk:Folder:Folder:" --wherever your folder is
tell application "Finder"
set theFiles to (name of every file in folder folderPath) as list
repeat with theFile in theFiles
set filePath to folderPath & theFile
open file filePath using application file id "XPR3"
--do stuff in QXP?
tell application "QuarkXPress"
--something here to close the file;
--I don't have QXP, so I don't know what it expects.
--check its dictionary for a 'close' command of some kind.
end tell
end repeat
end tell
I don't know the exact creator code for the version of QXP you have;
you must look that up yourself and replace "XPR3" with the correct
code.
You might also want to make sure that a file is the correct type
before opening it, to avoid the obvious error.
HTH,
-Walter
_______________________________________________
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.
References: | |
| >Request help (From: "BADRINATH, NANDINI" <email@hidden>) |