Re: How to delete text items?
Re: How to delete text items?
- Subject: Re: How to delete text items?
- From: Frank Watzl <email@hidden>
- Date: Sun, 3 Mar 2002 23:07:06 +0100
Hi,
I have a problem and I think you can help me.
And you are right. :-)
[
]I know I can count characters in text but how do you delete
specific characters?
on switchChars of oldString from oldChar to newChar
tell AppleScript to set {od, text item delimiters} to {text item
delimiters, oldChar}
set TextItemList to text items of oldString
tell AppleScript to set text item delimiters to newChar
set newString to TextItemList as string
tell AppleScript to set text item delimiters to od --restore previous tids
return newString
end switchChars
set string1 to "mac:news"
set string2 to switchChars of string1 from ":" to "" -- replace
colons with nothing, i.e. delete
Frank
--
Frank Watzl
Technische Kommunikation
Dahlmannstrasse 18
60385 Frankfurt am Main
Tel: 069 / 99 99 41 85
Mobil: 0179 / 207 99 67
Fax: 069 / 90 43 15 47
ISDN [Leonardo]: 069 / 44 54 00
_______________________________________________
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.