Hello.
I have text.txt with some information
123
222
444
Mike
....
....
222
Tom
111
How can i replace Mike to Nick in this file (text.txt) when i click on next button.
Professional Software Development Tools
Hello.
I have text.txt with some information
123
222
444
Mike
....
....
222
Tom
111
How can i replace Mike to Nick in this file (text.txt) when i click on next button.
Wrote for AMS, might work in SF8.
I didn't open AMS or check the help file so I'm not sure I used the right syntax for String.Replace, I'm so used to the PHP String.Replace. :PCode:local Contents = TextFile.ReadToString("path\\text.txt"); local NewContents = String.Replace(Contents, "Mike", "Nick", 1, false); TextFile.WriteFromString("path\\text.txt", NewContents, false);
Note that using the textfile route, if the other information might contain other data,such as "He mikes his own amp" instead of "444" you'll end up with "he Nicks his own amp" and Mike will remain.
(Click here to contact me)
Providing Independent Professional Consulting Services for
IndigoRose products, World Wide.
Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
Thanks you.