• 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: When to use text VS text item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When to use text VS text item


  • Subject: Re: When to use text VS text item
  • From: "J. Stewart" <email@hidden>
  • Date: Sat, 6 Sep 2008 10:41:46 -0400

On 9/6/08 at 8:30 AM, Shane Stanley <email@hidden> spake thusly:

The archived post gives a better example.


Well if we are looking for better examples how's this one...   :)


on SrchRplc(theTxt, srchStr, rplcStr)
local theTxt, temp, srchStr, rplcStr

# theTxt = text to be searched
# srchStr = text to be replaced
# rplcStr = text to replace with

if theTxt contains srchStr then
set {tids, my text item delimiters} to {my text item delimiters, srchStr}
set temp to every text item of theTxt
set my text item delimiters to rplcStr
set theTxt to temp
set my text item delimiters to tids
end if
return theTxt
end SrchRplc


J
--
Any government big enough to do things for you is big enough to do things to you.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: When to use text VS text item
      • From: Shane Stanley <email@hidden>
References: 
 >Re: When to use text VS text item (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: When to use text VS text item
  • Next by Date: Re: When to use text VS text item
  • Previous by thread: Re: When to use text VS text item
  • Next by thread: Re: When to use text VS text item
  • Index(es):
    • Date
    • Thread