Hello,
I'm trying to read a text file and find a key word "Cleaned" and if that keyword is found, I want it to run a batch file. If the keyword is not found then exit the application. Having issues with the if then syntax.
Any help would be great. Thanks
[CODE][/
binString = TextFile.ReadToString("C:\\ProgramData\\McAfee\\De sktopProtection\\OnDemandScanlog.txt");
arg = Input.GetText("Input1")
Where = String.Find(""..binString, ""..arg, 1, true)
--Dialog.Message("Data found at file pos:", ""..Where)
if arg == true then
File.Open("AutoPlay\\Docs\\VirusLog.bat", "", SW_SHOWNORMAL);
Application.Sleep(10000);
File.Delete("C:\\ProgramData\\McAfee\\DesktopProte ction\\OnDemandScanlog.txt", false, false, false, nil);
Application.Exit(0);
elseif arg == false then
Application.Exit(0);
endCODE]
I'm trying to read a text file and find a key word "Cleaned" and if that keyword is found, I want it to run a batch file. If the keyword is not found then exit the application. Having issues with the if then syntax.
Any help would be great. Thanks
[CODE][/
binString = TextFile.ReadToString("C:\\ProgramData\\McAfee\\De sktopProtection\\OnDemandScanlog.txt");
arg = Input.GetText("Input1")
Where = String.Find(""..binString, ""..arg, 1, true)
--Dialog.Message("Data found at file pos:", ""..Where)
if arg == true then
File.Open("AutoPlay\\Docs\\VirusLog.bat", "", SW_SHOWNORMAL);
Application.Sleep(10000);
File.Delete("C:\\ProgramData\\McAfee\\DesktopProte ction\\OnDemandScanlog.txt", false, false, false, nil);
Application.Exit(0);
elseif arg == false then
Application.Exit(0);
endCODE]
Comment