Hi,
I have an example .txt file which contains the following string of characters "There are 5 bottles of milk" (without quotes) in my script dir
so I have the following code to open/read the file
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
$File = FileOpen(@ScriptDir & "\testfile.txt")
$FileRead = FileRead($File)
$hFileRead = $FileRead
I'd like to set the number 5 as a variable to be displayed in a MsgBox - My question is how would I do this, knowing that the number '5' in the .txt file could change outside of autoit?
I was looking at the _FindInFile UDF found on this forum here autoitscript.com/forum/topic/132159-findinfile-search-for-a-string-within-files-located-in-a-specific-directory/ as I thought it may be a step in the right direction but I couldn't see how I'd do what I need to do.
Please can anyone help?
Thanks
am632