• 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: How to delete text items?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How to delete text items? (From: Martin Michel <email@hidden>)

  • Prev by Date: Re: How to delete text items?
  • Next by Date: Re: how to format decimal precision of a real?
  • Previous by thread: Re: How to delete text items?
  • Next by thread: How to delete text items?
  • Index(es):
    • Date
    • Thread