• 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: text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text item delimiters


  • Subject: Re: text item delimiters
  • From: kai <email@hidden>
  • Date: Mon, 1 Nov 2004 19:24:43 +0000


On Sun, 31 Oct 2004 23:13:57 -0500, David Andrews wrote:

Thanks Kai,

I think what I was poking at is that there appears to be but one item. Now I see that that does appear to be the case...

For all practical purposes - although the term 'text item delimiters' does seem to have been created with potential multiplicity, should it ever be desirable to incorporate in an application. Take, say, 'version' as a sort of parallel (albeit read-only) example:


----------------

property parent : application "TextEdit"
tell application "Script Editor" to {version, my version, AppleScript's version}


----------------

(Another aspect of the text item delimiters property, which also appears to have potential multiplicity, is the number of strings in the list. AppleScript still uses only the first delimiter - but one can't help wondering...)

Yea, and your [2] was done without any text item delimiters of AppleScript! (I just had to try it.)

Right. I deliberately sidestepped them. However...

----------------

set text item delimiters to {"rro"}
tell "More than one way to skin a cat" to item -3 & items -2 thru end

--> "carrot"

----------------

On Oct 31, 2004, at 4:07 PM, kai wrote:

[snip]
[2] Nine lives:

------------------

Of course, the repeat loop was a complete red herring...

----------------

tell "More than one way to skin a cat" to {text -3 thru -1, word 8, text 29 thru 31, word -1, text from word -1 to -1, last word, text from last word to end, last item of words, text end thru -3}

--> {"cat", "cat", "cat", "cat", "cat", "cat", "cat", "cat", "cat"}

----------------

But then there's more than one way, etc... ;-)

---
kai

_______________________________________________
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


  • Prev by Date: Re: Inheritance and Loaded Libraries
  • Next by Date: Re: Count of paragraphs in a TextEdit document
  • Previous by thread: Re: Inheritance and Loaded Libraries
  • Next by thread: Re: Dice
  • Index(es):
    • Date
    • Thread