• 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: Removing characters from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing characters from a string


  • Subject: Re: Removing characters from a string
  • From: John Delacour <email@hidden>
  • Date: Tue, 5 Nov 2002 15:12:26 +0000
  • Mac-eudora-version: 5.3a8

At 11:29 am +0100 5/11/02, christian vick wrote:

> I don't think we differ on the issue of using TIDs, Paul. I agree that, if a
script uses TIDs, it should leave them as it finds them.

What means "as it finds them"? Every script has it's own TIDs, so if you
know what your script is doing it shouldn't be a problem!??

Quite so! And the default is {""} and that's the best way to leave them -- always. So long as when a script exits or terminates the delimiters are reset to the default, there should never be any problem within a session.

I don't know where all this nonsense about getting the text item delimiters at the beginning and restoring them at the end comes from and nobody has ever given me any sensible reason. I have a feeling it must come from the New Age documentation that Apple put out when AppleScript was clewarly getting on the wrong track some years ago and the people writing the examples hadn't a clue -- plus ca change ....

Suppose I have the script below running as a stay-open applet constantly changing "AppleScript's text item delimiters". This has absololutely no effect on any other script that I run.

Note well that every time this applet is launched, the delimiters are {""}. If you change the delimiters in Smile or Script Editor or Script Debugger, then the changed setting will obtain for scripts in the current environment until you quit or reset without affecting other programs. A changer in Smile will not affect Script Editor and vice versa.

on run
{} & AppleScript's text item delimiters
display dialog "
Delimiters: " & item 1 of result & return & "Type cmd. to stop script."
repeat
repeat with c in characters of "qwertyuiop"
set AppleScript's text item delimiters to "" & c
end repeat
end repeat
end run


JD
_______________________________________________
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: Removing characters from a string (From: christian vick <email@hidden>)

  • Prev by Date: Box Overflows in Xpress 4.11
  • Next by Date: Box Overflows in Xpress 4.11 part 2
  • Previous by thread: Re: Removing characters from a string
  • Next by thread: Re: Removing characters from a string
  • Index(es):
    • Date
    • Thread