on pathName(fileAlias)
copy fileAlias as string to xx
copy text item delimiters of AppleScript to savedDelim
set text item delimiters of AppleScript to {":"}
set q to count of text items of xx
set filePath to (text items 1 thru (q - 1) of xx as string) & ":"
set fileName to last text item of xx as string
set text item delimiters of AppleScript to savedDelim
end pathName
on open opy
set opx to 1
repeat number of items in opy times
path to desktop from user domain
set theHD to result as string
tell application "QuarkXPress"
activate
open item opx of opy
set docpath to file path of front document
set fileName to name of front document
my pathName(docpath)
tell project 1
set name of layout space 1 to fileName
end tell
end tell
tell application "QuarkXPress"
save document 1
close document 1
end tell
set opx to opx + 1
end repeat
tell application "QuarkXPress"
display dialog "Done" buttons {"OK"} default button 1 with icon 1
end tell
end open
This is my first post here, so please be patient with me. I am fairly new to AppleScripting as well, with just a few fun and semi-functional scripts in my bag so far.
This script actually does work, but not in the manner I need it too. There are directories with mixed file types and I need to be able to drop a full directory on the AppleScript. Dropping the .qxd files directly works just fine. It will open all the files dropped on it, but when a folder is dropped, it will not process or close them. Is there a simple bit of code that I can paste in, or is a rewrite in order?
thanks,
Levon
Model: Dual 2.3GHz G5
AppleScript: 2.1.1
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)
Quark XPress 6.5