• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Indexing Quark
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indexing Quark


  • Subject: Indexing Quark
  • From: "Ripka, Herb" <email@hidden>
  • Date: Mon, 27 Jul 2009 11:03:07 -0500
  • Acceptlanguage: en-US
  • Thread-topic: Indexing Quark

The following script will look for all text set in the paragraph style sheet "Title" and create a TextEdit list with the text that was found with that style, and the page number it was found on.

For certain jobs, sometimes "Title" doesn't work for this script, even though words have been styled with that paragraph style. Even weirder, sometimes another paragraph style sheet name does work, like "Description", and that will find the title!!

Why??

--Herbert Ripka
Greendale, WI

P.S. I realize that Quark has this as a built-in function, but am trying to do this via AppleScript.

set recipe to ""
set thisline to ""

tell application "QuarkXPress Passport"
	activate
	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 "Title")
						repeat with aParagraph in foundParagraphList
							set thisline to contents of aParagraph & pageName & return
							set recipe to recipe & thisline
						end repeat
					end tell --aTextBox
				end repeat
			end tell --aPage
		end repeat
	end tell --document
end tell

tell application "TextEdit"
	make new document at beginning with properties {text:recipe as Unicode text}
	activate
end tell --application _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: why do I have to specify the path to the application?
  • Next by Date: RE: why do I have to specify the path to the application?
  • Previous by thread: RE: why do I have to specify the path to the application?
  • Next by thread: In a handler passed as a parameter to a handler in another script, how do I refer to top-level variables from the original script?
  • Index(es):
    • Date
    • Thread