Re: selecting boxes in Quark
Re: selecting boxes in Quark
- Subject: Re: selecting boxes in Quark
- From: email@hidden
- Date: Mon, 15 Dec 2003 17:27:06 -0700
Boxes in Quark are referenced in the order in which they are placed (first
box placed is box 1). But this is not reliable as the user could send the
box to the front or back and alter the stacking order of the boxes. You
need to use some method to identify the boxes in order to determine which
box is selected by the user. There are two principal ways this can be done:
1) Use unique id. A unique id is given to each object by Quark when it is
created. Capture the unique id into a variable to use later in the script:
tell application "QuarkXPress"
tell document 1
set theBox to (make text box at beginning with properties {bounds
{"3p", "3p", "40p", "28p"}})
set theID to uniqueID of theBox
end tell
end tell
When the user selects a box (current box), you can get the unique ID of the
box using the following:
tell application "QuarkXPress"
set theID to uniqueID of current box
end tell
2) Give the box a name when it is created:
tell application "QuarkXPress"
tell document 1
set theBox to (make text box at beginning with properties {bounds
{"3p", "3p", "40p", "28p"}, name: "MyHeaderBox"}
end tell
end tell
When the user selects the box (current box), get the name of the box:
tell application "QuarkXPress"
set theName to name of current box
end tell
Notice that the examples direct the statements to document 1. This will
only work for the first page of the document. If you need to work with more
pages, direct the statements to the page (tell page 2 of document 1, etc.)
If you have further questions, please do not hesitate to email me. (I try
to monitor the AppleScript List, but can't guarantee that I will will read
all posts.)
Shirley Hopkins
FaceSpan Support (email@hidden)
email@hidden
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.