I have this thing where I make picts with specific naming conventions like “this.H-b” and “that.F-b”. Some of the pict files have a “.H-” at the end of the name and some have a “.F-” at the end of the name.
My question is does anyone know how I could even start a script to have the finder search the folder with the pict files in them and tell the finder to open quark draw a box the specific size and position I want for the “.H-” files in the quark document, and do that also for the “.F-” files with different size and position coordinates than the “.H-” files.
To explain why I want this scipt is that I make picts of ads that are needed for pagination in quark. Each pict is named either “H-” (Half page) or “F-” (Full page). I hav a “-” after the letter for the reason that I will have another letter specifying location of coupons on the ad, example “.H-b”. I figured all I needed was to have the script look for the common characters within the name.
Thanks, Jeff
Try this sample script.
It will create pages based on the count of files in the folder.
Then it will examine each file for the required characters and then create
either a full page of half page picture box and place the image in that box.
set x to choose folder
set filelist to list folder x
set xx to ((count of filelist) - 1)
set pw to 300 as real
set ph to 500 as real
tell application "QuarkXPress™ "
activate
make new document at beginning with properties {page width:pw, page height:ph}
tell document 1
repeat xx times
make new page at beginning
end repeat
set thecount to 1
repeat with loopVar in filelist
tell page thecount
if loopVar ends with ".H-" then
make new picture box at beginning with properties {bounds:{(ph / 2), 0, ph, pw}}
set image 1 of picture box 1 to x & loopVar as text as alias
else if loopVar ends with ".F-" then
make new picture box at beginning with properties {bounds:{0, 0, ph, pw}}
set image 1 of picture box 1 to x & loopVar as text as alias
end if
set thecount to thecount + 1
end tell
end repeat
end tell
end tell