Setting the bounds of a QuarkXPress picture box
Setting the bounds of a QuarkXPress picture box
- Subject: Setting the bounds of a QuarkXPress picture box
- From: Tony White L1 <email@hidden>
- Date: Mon, 27 Jun 2005 01:59:42 -0400
I am trying to import a folder of eps images and resize the (staggered)
picture boxes to match the size of the eps images. I am able to read the
bounds of the image, but I do not see how to resize the image box based on
that info.
The line below:
set bounds of picture box 1 to {top_var, left_var, bottom_var, right_var}
Results in error message "QuarkXPress got an error: Can't set bounds of
picture box 1 of picture box 1 of current page of document 1 to {30, 25, 41,
62}." as indicated below.
Here is the script:
------------------------
set the_file_paths to {"G5:Users:accountname:Desktop:AS In Box:Image1.eps",
¬
"G5:Users:accountname:Desktop:AS In Box:Image2.eps"}
set top_var to 30
set left_var to 25
-- using QuarkXPress 6.1
-- units set to points
tell application "QuarkXPress"
activate
tell default document 1
set properties to {page width:"8.5\"", page height:"11\""}
end tell
make document at beginning
repeat with i from 1 to (count of the_file_paths)
tell document 1 -- makes a page automatically
tell current page
make picture box at beginning with properties ¬
{bounds:{top_var, left_var, 200, 300}}
set bounds_var to bounds of picture box 1
-- log result
tell picture box 1
set image 1 to (item i of the_file_paths) as alias --
Get Picture = Works
set width_var to width of bounds of image 1
set right_var to left_var + width_var
set height_var to height of bounds of image 1
set bottom_var to top_var + height_var
set bounds of picture box 1 to ¬
{top_var, left_var, bottom_var, right_var}
-- QuarkXPress got an error: Can't set bounds of picture
-- box 1 of picture box 1 of current page of document 1 to {30, 25, 41, 62}.
set top_var to top_var + 5
set left_var to left_var + 5
end tell -- picture box 1
end tell -- current page
end tell -- document 1
end repeat -- with i from 1 to (count of the_file_paths)
end tell -- application "QuarkXPress"
---------------------
I searched through the past postings and did not find this covered.
Any suggestions on this would be much appreciated.
Thanks.
All the best,
Tony White
Tony White Designs, Inc.
118 Remsen Street
Brooklyn, NY 11201
Tel: 718-797-4175
email@hidden
http://www.twdesigns.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden