Code: Select all
#Persistent
SetTimer, hpiback, 10000
hpiback:
ControlGetText, buhpi, Edit1, Progress Note
;msgbox here tested to have the correct %buhpi%
If (buhpi !:= "")
{
FileDelete, C:\Users\USER\Desktop\HPI Backup.txt
sleep, 10
;msgbox here tested to have the incorrect %buhpi%
FileAppend, %buhpi%, C:\Users\USER\Desktop\HPI Backup.txt
}
Sleep, 10000