RE: Naming Quark boxes - screwed up!
RE: Naming Quark boxes - screwed up!
- Subject: RE: Naming Quark boxes - screwed up!
- From: "Goodman, Steve" <email@hidden>
- Date: Tue, 17 Apr 2001 13:15:37 -0500
>
I am doing this very simple operation in three steps to try
>
and solve this
>
strange behaviour:
>
>
tell application "QuarkXPress"
>
tell document 1
>
set theBox to the object reference of the current box
>
set theIndex to the index of theBox
>
set name of generic box theIndex to "hello"
>
end tell
>
end tell
>
>
When I select a single box and run this script, it always
>
names SEVERAL
>
different, unrelated boxes! WHY? I just want to name a few boxes by
>
selecting them, and then running one of 10 scripts that names up to 10
>
boxes, picture boxes really.
>
>
I have been struggling with variations on this but have not
>
been successful
>
getting this to work, but I don't understand why it won't
>
work! I can't rely
>
on the stacking order and need to target these few "marked"
>
boxes out of a
>
slew of other boxes.
Boxes (whether picture or text) sometimes have the same "ID" number (not
sure why...I just know it happens) that is probably why you are getting
multple boxes named when you run the script. There is a "uniqueID" property
that should work for you. If you are doing one box at a time then this
should work also:
-- ---------------------------------------------------------
-- Preprocessed by Convert Script 1.0d4
-- ---------------------------------------------------------
tell application "QuarkXPress(tm) 4.1"
activate
tell document 1
display dialog "Assign a name to the selected box" default answer ""
buttons {"Cancel", "OK"} default button "OK"
if button returned of result is "OK" then
set name of current box to text returned of result
end if
end tell
end tell
-- ---------------------------------------------------------
Steve Goodman
Vertis - THE LTC GROUP
.......If you think nobody cares if you're alive, try missing a couple of
car payments.------Unknown
>
-----Original Message-----
>
From: Steve Kump [mailto:email@hidden]
>
Sent: Tuesday, April 17, 2001 10:54 AM
>
To: AppleScript
>
Subject: Naming Quark boxes - screwed up!
>
>
>
Hi List,
>
>
I am doing this very simple operation in three steps to try
>
and solve this
>
strange behaviour:
>
>
tell application "QuarkXPress"
>
tell document 1
>
set theBox to the object reference of the current box
>
set theIndex to the index of theBox
>
set name of generic box theIndex to "hello"
>
end tell
>
end tell
>
>
When I select a single box and run this script, it always
>
names SEVERAL
>
different, unrelated boxes! WHY? I just want to name a few boxes by
>
selecting them, and then running one of 10 scripts that names up to 10
>
boxes, picture boxes really.
>
>
I have been struggling with variations on this but have not
>
been successful
>
getting this to work, but I don't understand why it won't
>
work! I can't rely
>
on the stacking order and need to target these few "marked"
>
boxes out of a
>
slew of other boxes.
>
>
I hope someone can explain what is happening here.
>
Thanks,
>
--
>
Steve Kump
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users