Re: Removing characters from a string
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.