Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
to replace the text in the file of a notepad
#2
Macro Macro2865
Code:
Copy      Help
str filePath="Q:\test\test.txt"
str fileText.getfile(filePath)

str oldText=
;1=
;9,800
;2=
;9,500

str newText=
;Bom 9,800 bibom
;Mango 9,500 tango

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

if(n) fileText.setfile(filePath)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)