I have a ParentFolder containing several SubFolders. Inside the SubFolders are Quark docs. I would like to send a Quark doc in each folder (based on a text string search of the word CLEAN) to Flightcheck for collection.
This is what I’ve gotten so far, but it’s not placing the collected docs into a folder (named the document name) like I’d like. Any suggestions? I really just need to have help w/ Flightcheck’s dictionary (I can’t find how to select destination folder and how to put flightchecked docs into separate folders).
Thanks,
set mystartfolder to (choose folder with prompt "Choose job folder for Flightcheck collection")
set destFolder to (choose folder with prompt "Choose destination folder for collected pages")
tell application "Finder"
activate
open folder mystartfolder
set startfoldername to name of mystartfolder
set AllFolderList to (folders of folder mystartfolder whose name does not contain "Format") --as list
--set DestFoldername to startfoldername & "_Quark_Pages"
--if not (exists folder DestFoldername of mystartfolder) then make new folder in folder mystartfolder with properties {name:DestFoldername}
--open folder DestFoldername of mystartfolder
repeat with thisFolder in AllFolderList
set thisFolderName to name of thisFolder
--set quarkDest to folder DestFoldername of mystartfolder
set quarkPageList to (every item of thisFolder whose name contains "CLEAN") -- FIRST TRY TO GET A CLEAN
if (count of quarkPageList) is less than 1 then set quarkPageList to (every item of thisFolder whose name contains "MER") -- IF NO CLEAN THEN TRY FOR A MER
if (count of quarkPageList) is less than 1 then set quarkPageList to (every item of thisFolder whose name contains "CREATIVE") -- IF NO CLEAN OR MER THEN LOOK FOR A CREATIVE
repeat with quarkFile in quarkPageList
-- NOW YOU CAN EITHER COPY THE QUARK FILE TO A HOLDING FOLDER TO PROCESS LATER AS I DO BELOW
-- OR YOU CAN CALL YOUR SUBROUTINE THAT WILL OPEN THE FILE IN FLIGHT-CHECK AND DO A COLLECT.
--duplicate quarkFile to quarkDest with replacing
my FlightCheckSub(quarkFile as string, destFolder as string)
set label index of quarkFile to 2 -- THIS COLORS THE ORIGINAL FILE THAT YOU COPIED
end repeat
end repeat
beep 3
activate
display dialog "Quark Pages collected." buttons {"Done"} default button 1 with icon 1 giving up after 10
end tell
on FlightCheckSub(quarkFile2, destFolder2)
tell application "FLIGHTCHECK®"
display dialog "quarkFile2= " & quarkFile2 & return & "destfolder2= " & destFolder2
open quarkFile2 -- or flightcheck quarkFile
do collection -- to (destFolder2 as alias)
end tell
end FlightCheckSub