• 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
Sample Quark "selection" script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sample Quark "selection" script


  • Subject: Sample Quark "selection" script
  • From: George Mack <email@hidden>
  • Date: Sun, 18 Nov 2001 13:49:00 -0500

Fred Yocum asked (Nov. 12) how to manipulate the text in a Quark Selection.

Just catching up on a week of ASUser digests, so if you already got enough information, please forgive me. (I suspect that Hans Haesler or Shane Stanley will be along before you even get this; they're pretty fast on the uptake. If so I apologize - I still have several digests to read.)

Here is one I wrote to put number each paragraph of selected text.

tell application "QuarkXPress 4.11"
tell document 1
tell selection
copy (count paragraphs) to ParaCount
repeat with i from 1 to ParaCount
if contents of paragraph i is not return then [opt-L]
set contents of paragraph i to ((i as text) & "." & [opt-L]
tab & contents of paragraph i)
end repeat
end tell
end tell
end tell

The test, "if contents ...." is because if you include the final return in your selection, you may get a new dummy paragraph which causes false numbering.

Note that you don't have to identify active boxes or specific pages in addressing the "selection."

Hope this helps

George Mack
--
GEORGE MACK DESIGN - Scituate, MA 02066 - (781) 544-3880
Design - Illustration - Desktop Publishing


  • Prev by Date: Re: Mac OS X: AppleScript incorrectly decompiling tell blocks
  • Next by Date: Re: Scripting Default Folder's scripting addition
  • Previous by thread: Re: Scripting Default Folder's scripting addition > "SetFileDialogFolder" ...
  • Next by thread: Re: Scripting Default Folder's scripting addition
  • Index(es):
    • Date
    • Thread