Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
to replace the text in the file of a notepad
#3
You help me with my programm. I can't thank you enough for your help.
I have allowed inaccuracy in a task. digits 9,800 and 9,500 are always different, I don't know with what they will be next time. how to make them a variable?
Code:
Copy      Help
int G1 G2 ={any text}
str filePath="Q:\test\test.txt"
str fileText.getfile(filePath)

str oldText=
;1=
;G1
;2=
;G2

str newText=
;Bom G1 bibom
;Mango G2 tango

int n=fileText.findreplace(oldText newText 2) ;;see also replacerx
out F"Replaced {n} instances"

if(n) fileText.setfile(filePath)
something like that.....


Messages In This Thread

Forum Jump:


Users browsing this thread: 12 Guest(s)