From: Paul Guyot (pguyot_at_kallisys.net)
Date: Mon Apr 28 2003 - 22:37:56 PDT
Il me semble que le 28/4/03 à 22:22 -0700, Ed Kummel nous racontait:
>But barring that, is there
>something (or some quick and dirty way...I don't know,
>like using a Newton script or something) that will
>allow me to search the Names app for "wcom.com" and
>replace it with "mci.com" (for the email field)
I would do a backup before trying this untested scriptlet (I didn't
even check that it compiles).
<---->
func(searchString, replaceString)
begin
local theCursor := GetUnionSoup("Names"):Query(nil);
local theEntry := theCursor:entry();
while (theEntry) do
begin
// Search the text in the entry (NPR 23-16)
local theResultArray :=
FindStringInFrame(theEntry, [searchString], nil);
if (theResultArray) then
begin
// Found somewhere.
// (we don't need the path since StrReplace is destructive
// to the input string)
foreach foundString in theResultArray do
StrReplace(foundString, searchString,
replaceString, 1);
// Save the changes.
EntryChangeXmit(theEntry, '|scriptlet:NTLK|);
end;
// Next entry.
theEntry := theCursor():Next();
end;
<---->
Paul
-- NPDS: http://newton.kallisys.net:8080/ Apache: http://www.kallisys.com/ -- This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html Official Newton FAQ: http://www.chuma.org/newton/faq/
This archive was generated by hypermail 2.1.5 : Mon Apr 28 2003 - 23:30:01 PDT