• 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
Re: Punctuation in Applescript's Text Item Delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Punctuation in Applescript's Text Item Delimiters


  • Subject: Re: Punctuation in Applescript's Text Item Delimiters
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 12 Jan 2002 14:54:38 +1100

On 12/1/02 2:02 PM +1000, Jay Young, email@hidden, wrote:

> Does anyone know if it is possible to grab punctuation characters in
> applescript's text item delimiters when the punctuation is the last
> character alone? Here's an example:
>
> Today (tab) is (tab) Friday (tab) ? (return)
>
> --script
> set Applescript's text item delimiters to tab
> tell app "QuarkXPress 4.11"
> tell story 1 of text box 1 of document 1
> try
> set para1 to paragraph 1
> set paraitm to text items of para1
> set paragraph 2 to text item 4 of paraitm --trying to grab the question
> mark
> end try
> end tell --story 1
> end tell --Quark
> set Applescripts text item delimiters to ""
>
> The only way I can get the question mark to flow out into paragraph 2 is
> if I add a text character after it. Is there any other possibilities?
> Thanks for your help.

Your problem isn't with the text item delimiters -- it's with QuarkXPress,
which drops trailing punctuation when you ask for a paragraph. Change your
script to "set para1 to text of paragraph 1" and it will get the trailing
punctuation, as well as the trailing return if any.

--
Shane Stanley, email@hidden


References: 
 >Punctuation in Applescript's Text Item Delimiters (From: Jay Young <email@hidden>)

  • Prev by Date: 'do shell script'-bug?
  • Next by Date: Re: Query for Paul or anyone about Entourage Categories
  • Previous by thread: Punctuation in Applescript's Text Item Delimiters
  • Next by thread: Copy to clipboard when non supported?
  • Index(es):
    • Date
    • Thread