Re: When to use text VS text item
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