• 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 ("null" isn't TID default)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Real Simple Question ("null" isn't TID default)


  • Subject: Re: Real Simple Question ("null" isn't TID default)
  • From: David Lloyd <email@hidden>
  • Date: Thu, 07 Nov 2002 20:56:54 +1100

Mark Myers commented...

> AppleScript's text item delimiters are the characters used to separate
> one text item from another. The default is "" (the null character)....

Ooooo that's not right - the default TID is nothing, i.e no charcter at all.
Null is in fact a character, it's ascii number 0.

You shouldn't reset the delims to null, you should reset it to "".

(Null doesn't mean nothing.)

A null character can look like nothing in a script editor result but you can
tell that a sub-32 ascii number character exists by moving the I-beam cursor
along the resultant text by pressing the right-arrow on the keyboard.

Do this to the result of:

set x to "a" & (ASCII character 1) & "p" & (ASCII character 2) & "p" &
(ASCII character 3) & "l" & (ASCII character 4) & "e"

You'll see that the cursor appears to just stop then continue as you click
the cursor along.

So "" is not necessarily null, it could be any character less than ascii
number 32 (or it could in fact be nothing at all.)

-----

A lot of scripters reset the TIDs to a pre-gotten variable
(after typing an extra line of code to establish it):

set oldDelim to applescript's text item delimiters
--some code...
set applescript's text item delimiters to oldDelim

I've always wondered why not just do:

set applescript's text item delimiters to "" ?

It's less work... :)

-----

In many years, this has never failed...

Best regards,

David Lloyd

---------------------------------
email: email@hidden
web: http://www.kanzu.com
---------------------------------
_______________________________________________
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.

  • Follow-Ups:
    • Re: Real Simple Question ("null" isn't TID default)
      • From: Doug McNutt <email@hidden>
    • TIDs info summary
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Import Mail.app messages to Eudora
  • Next by Date: AS and QuarkXpress (and others)
  • Previous by thread: Import Mail.app messages to Eudora
  • Next by thread: TIDs info summary
  • Index(es):
    • Date
    • Thread