• 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
Working with a text selection in Quark
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Working with a text selection in Quark


  • Subject: Working with a text selection in Quark
  • From: Rob Stott <email@hidden>
  • Date: Wed, 10 Oct 2001 09:19:43 +0100

Hi, I'm trying to write an applescript which will substitute every occurance
of a capital letter W with a lower case w in a given selection - I'd have
thought it would be pretty easy but I'm running into problems. The script so
far is;

tell application "QuarkXPress"
set theTotalCharacters to the count of the characters of the selection
repeat with i from 1 to theTotalCharacters
if character i of the selection is "W" then set character i of the
selection to "w"
end repeat
end tell

It works for the all the script except for the last character of the
selection which gets the following error;

get character 300 of selection
--> QuarkXPress got an error: Can't get character 300 of selection.

(I'm testing it on a text box filled with 300 capital W's)

Can anyone give me any hints as to where I'm going wrong?

Thanks in advance
Rob

--

"When two or more people agree on an issue, I form on the other side." -
Bill Hicks


  • Follow-Ups:
    • Re: Working with a text selection in Quark
      • From: wemedge <email@hidden>
    • Re: Working with a text selection in Quark
      • From: Frank Miedreich <email@hidden>
  • Prev by Date: Re: Whose-Filtering a Text List???
  • Next by Date: Re: Coercion of string to a record label
  • Previous by thread: Re: Whose-Filtering a Text List???
  • Next by thread: Re: Working with a text selection in Quark
  • Index(es):
    • Date
    • Thread