I am a beginner at AutoIt or any code writing. I am trying to copy the last instance of numeric characters in the left side of a log file. Sample text below
99 MOUSE MICKEY AF2 UBX ABC A3E F 0 UB IF NO ZOID ---> This is a sequence number. I may be 1 to 3 digits. (1 Digit -SpaceSpaceDigit, 2 Digit - SpaceDigitDigit, 3 Digit - DigitDigitDigit
XX XYZ
100 DUCK DONALD ZOP A4T F 0 M ABCD XTI VE ---> Sequence number 100 needs to be captured in this example
VE-XX 0312/SUPER/BS BS /HI/1 /0
UPTO10 CLIENTS
DEM-8739081678436 C23
DO-UX 0312/SUPER/ SA /HI/1 /0
DEM-5209617693789 C23
The script will execute a format which will print the above display to a log file. The capture should happen after the above display has been logged
My script so far. In the end I want the Until $a = 100 (in my example, which was extracted from the log file)
WinActivate("My Application")
WinWaitActive("My Application")
$file = "C:\Users\Charlie\Desktop\log.txt" ;Log file from where data will be captured
$file1 = FileRead($file)
Local $a = 0 ;Loop counter variable
Do
$a += 1 ;Adds 1 to the loop counter
Send("INSTANCE " & $a & "{ENTER}")
Sleep(1000) ;Waits
Until $a = $File1 ;How many times to loop