• 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: Real Simple Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Real Simple Question


  • Subject: Re: Real Simple Question
  • From: Joey Parshley <email@hidden>
  • Date: Wed, 06 Nov 2002 11:07:02 -0500

Thanks Paul. I new it had to be something simple. I've been racking my brain
to decipher that acronym. Thanks for the excellent description.

Joe
On 11/6/02 10:51 AM, "Paul Berkowitz" <email@hidden> wrote:

> On 11/6/02 7:18 AM, "Joey Parshley" <email@hidden> wrote:
>
>> I am trying to learn AS and I see references to tid's. What does that mean?
>>
>
> AppleScript's text item delimiters (Test Item Delimiters). They are very
> useful: you can turn lists of strings into a string using any tid (perhaps a
> carriage return, or a comma, or a space) to be inserted between the
> original list items. And you can use it as a search string to break up a
> long string into lists, change the delimiter, and turn it back into a string
> again:
>
> set str to "I caught the fish and sent it to the friend of my cousin's."
> set AppleScript's text item delimiters to {" the "}
> set lst to text items of str
> -- {"I caught", "fish and sent it to", "friend of my cousin's."}
> set AppleScript's text item delimiters to {" a "}
> set str to lst as string
> --"I caught a fish and sent it to a friend of my cousin's."
> set AppleScript's text item delimiters to {""}
>
>
> (They are usually used to a greater purpose than in that example. ;-)) They
> are "universal" to all scripts in the application running the script, for
> that session, i.e. until you quit it. That is more of an issue if you are
> running compiled scripts in another application - e.g. Script Editor,
> TexEdit Plus, Outlook Express - than in a a script application which
> finishes its "session" as soon as the script finishes. But that's why you
> need to reset tids when you're done. There is some disagreement as to
> whether it's all right to reset them to the default {""} as I just did
> above, or whether you should first find out what they are and reset them to
> that at the end. (I happen to agree with JD that unless you are returning
> from a handler - subroutine - when you might well need to return to some
> other tids, that setting to the default {""} is actually a good safety
> measure just in case another script has forgotten to reset them. Never
> mind.)
>
> You can read the full details in the AppleScript Language Guide, available
> in PDF from the Apple AppleScript website.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Real Simple Question (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Comments, please.
  • Next by Date: Re: TIDs setting and resetting debate (was other stuff)
  • Previous by thread: Re: Real Simple Question
  • Next by thread: Re: Real Simple Question
  • Index(es):
    • Date
    • Thread