How to compare a same variable with its previous stored value?
In the below how would File1 accomplish this?
If File1 stored value is higher than its previous stored value continue until new stored value is lower
example: File1 = 1.05, continue, File1 = 2.89, continue, File1 = 3.53, continue, File1 is now 2.91 then it is lower than previous stored value of 3.53 --> activate the fileappend and exit.
Code: Select all
StoredValue := 1.00
Fileread, Tempfile, Tempfile.txt
If (Tempfile > StoredValue)
{
loop
{
sleep, 5000
fileread, file1, file1.txt
; here is the requested help:
If (File1 > previousfile1var continue to loop, if current File1 value is lower than previous File1 value then do the following...)
{
fileappend,
(
%file1%`n
),Final.txt
exitapp
}
}
}