FW: QXP and Anchored Text Boxes
FW: QXP and Anchored Text Boxes
- Subject: FW: QXP and Anchored Text Boxes
- From: "Grimm, Kenneth" <email@hidden>
- Date: Mon, 15 Sep 2003 20:52:47 -0400
>
To all:
>
>
I'm developing this script to search through the text and if it finds the
>
stock number, add an anchored picture box above the text.
>
>
It goes finds the first stock number (sometimes the second), inserts the
>
correct anchored picture and then will not find any more. No erros
>
reported, it just compeltes the script and never finds any other stock
>
numbers.
>
>
Can you see something wrong I'm missing?
>
>
Thanks,
>
>
Ken
>
>
tell application "QuarkXPress(tm) 4.11"
>
tell document 1
>
repeat with stkNumberToCheck in {"256875", "184351", "218205"}
>
set myStockNumber to stkNumberToCheck as string
>
repeat with i from 1 to count of paragraphs
>
if paragraph i of story 1 contains myStockNumber then
>
make picture box at beginning with properties
>
{name:myStockNumber, bounds:{"0.0\"", "0.0\"", "0.5\"", "1.0\""}}
>
set tool mode to drag mode
>
select picture box myStockNumber
>
cut
>
set tool mode to contents mode
>
set selection to insertion point before character 1 of
>
paragraph i of story 1
>
paste
>
end if
>
end repeat
>
end repeat
>
end tell
>
end tell
_______________________________________________
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.