I have a script which is giving me a headache and would like some help is nayone knows.
The following script works fine on generic text boxes in Quark but for some reason it will not work on my document which has a named text box.
The code is as follows:
[tell application “QuarkXPress™”
activate
tell page 1 of document 1
tell story 1 of text box “boxAdNumber”
set horizontal scale to 100
end tell
set overflowTorF to get box overflows of text box “boxAdNumber”
if overflowTorF = true then
repeat until overflowTorF = false
tell story 1 of text box “boxAdNumber”
set horScale to horizontal scale as text
set origDelim to AppleScript’s text item delimiters --copy current delimiter to a variable
set AppleScript’s text item delimiters to “”
set horScaleCount to (count of characters of horScale)
set horScale to characters 1 thru (horScaleCount - 1) of horScale as string
set AppleScript’s text item delimiters to origDelim
set horScaleTxt to horScale as text
set horScale to (horScale - 5)
set horizontal scale to horScale
set overflowTorF to get box overflows of text box “boxAdNumber”
end tell
end repeat
end if
end tell
end tell]
It will only go through once and scales my text to 95%.
Then is stops and says
“QuarkXPress™ got an error: Can’t get box overflows of text box “boxAdNumber” of story 1 of text box “boxAdNumber” of page 1 of document 1.”
Anyone with any ideas?
Thanks