For my workflow i need often make new quakXpress document, size variable and allways import a picture
Script should do: Start quark, open dialog where i give specific size for a new document, and wict this specific size and makes a picture box wich has size of document plus 5mm bleeds each side!
What I wrote:
tell application "QuarkXPressâ„¢ 4.1"
activate
set temp1 to display dialog "Enter page height" default answer ""
set page_height to text returned of temp1
set temp2 to display dialog "Enter page width" default answer ""
set page_width to text returned of temp2
make new document
try
tell document 1
set page width to page_height
set page height to page_width
end tell
make new picture box 1 with properties ¬
{width:page_width, height:page_height}
end try
end tell
it goes perfect, befor “make new picture box” beginn, it dooesnt work
pls help
p.s. I reat this forum, tried searching, but didnt find any examples new picture box making
the funniest, it works with command “make new text box”
tell application “QuarkXPressâ„¢ 4.1”
activate
set temp1 to display dialog “Enter page height” default answer “”
set page_width to text returned of temp1
set temp2 to display dialog “Enter page width” default answer “”
set page_height to text returned of temp2
make new document
try
tell document 1
set page width to page_width
set page height to page_height
end tell
tell document 1
make text box at beginning with properties {bounds:{“-5mm”, “-5mm”, page_height + 5, page_width + 5}}
end tell
tell application “QuarkXPressâ„¢ 4.1”
activate
set temp1 to display dialog “Enter page height” default answer “”
set page_width to text returned of temp1
set temp2 to display dialog “Enter page width” default answer “”
set page_height to text returned of temp2
make new document
try
tell document 1
set page width to page_width
set page height to page_height
end tell
tell document 1
make picture box at beginning with properties {bounds:{“-5mm”, “-5mm”, page_height + 5, page_width + 5}}
end tell
It looks like you got most of this on your own. You want to make sure that your ruler units is set properly for the units that you are using for math, if your script is set up for mm but your rulers are set to cm or picas then your measures will be off. When I script a design application I always move to points but mm should be fine since it is a whole numbe system so the math is straight foreword. It has been a while but I think that Quark also accepts designations so you could use (page_height + 5 in mm units) I think this is the correct syntax for Quark 4.11.