Re: Quark 6.1 index / "Edit List" replacement?
Re: Quark 6.1 index / "Edit List" replacement?
- Subject: Re: Quark 6.1 index / "Edit List" replacement?
- From: Peter Waibel <email@hidden>
- Date: Thu, 17 Aug 2006 12:27:15 +0200
Hi Scott,
here is a solution walking down the hierachy:
---------------------------------------
set resultRecList to {}
tell application "QuarkXPress"
tell document 1
set pageList to every page
repeat with aPage in pageList
tell aPage
set pageIndex to index
set pageName to name
set textBoxList to every text box
repeat with aTextBox in textBoxList
tell aTextBox
set foundParagraphList to (every paragraph whose style sheet is
"foo")
repeat with aParagraph in foundParagraphList
set end of resultRecList to {pageName, pageIndex, contents of
aParagraph}
end repeat
end tell
end repeat
end tell
end repeat
end tell
end tell
return resultRecList
---------------------------------------
Peter
Am 16.08.2006 um 19:58 schrieb Scott Lawton:
I want to create a simple "table of contents" / index with the text
contents and page # of 2 specific style sheets. To do by hand, I
can "Edit List", choose the styles and the Numbering, then Window >
"Show Lists" > click Build. (I actually just want the raw text to
send to another program.)
How do I do that in AppleScript?
I know that Quark allows "walking back up" the object hierarchy,
but I've found very few examples via Google and I can't get the
syntax quite right.
A simple case that works:
tell application "QuarkXPress"
tell document 1
get index of page 1 of current box
-- get page number of page 1 of current box -- also works
end
end
Some things that don't work:
get index of (first paragraph whose style sheet is "foo")
get index of text box 1 of (first paragraph whose style sheet is
"foo")
get index of text box 1 of story 1 of (first paragraph whose style
sheet is "foo")
Of course eventually I need "every" not "first" -- and the text
along with the page numbers. 2 parallel lists is fine; I can
iterate to generate lines of "blah blah[tab]page#".
Any suggestions?
--
cheers,
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40opix.de
This email sent to email@hidden
_______________________________________________
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