Subject: | |
From: | |
Reply To: | |
Date: | Sun, 22 Oct 2006 17:38:29 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
>>I've been using ACME Script Widgets' "ACME Replace" command for so long I
>>barely remember how to search and replace strings within strings in vanilla
>>AS. However, I find myself needing to do that, because my ACME Replace
>>commands are hanging in some of my newer scripts in OS 10.3.8. (They never
>>error out; the script just never finishes running, and then script editor
>>crashes.)
>
>Maybe you can choose to switch to Satimage.osax.
One reason to want ACME replace is to do lists, as in
set foo to Acme Replace {"<p>","<br>"} in foo substitution text ""
It hangs sometimes if the search target is not present. One solution
is to wrap the command in an if block, as
if foo contains "whatever"
Acme Replace "whatever" etc.
end if
I just found out that you can simulate the list in Satimage with a second list:
set foo to change {"<p>","<br>"} into {"",""} in foo
--
Bill Steele
[log in to unmask]
|
|
|