Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading and writing from a log file
#2
You can use global int variable, or registry functions rget and rset. If file is required, then you can use string functions getfile and setfile. I can help you if it is hard to understand or must be implemented in other way: please send me email.
Alternatively, you can use ini file. Sample below saves variable to ini file. If you run it 5 times, it will show message. Sample equires "winapiQM.txt" file to be selected in Options\Files\Reference_file.

...
int i=GetPrivateProfileInt("Print" "count" 0 "c:\qm.ini") + 1
if(i>=5) i=0; mes ""
str s = i
WritePrivateProfileString("Print" "count" s "c:\qm.ini")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)