I'm trying to extract the line number from an auto generated text file to determine quantity of items (ie if string is on line 9 this means there is one number, if string is on line 11 this means there is 3 number).
I looked through the forums and found something similar on the archived forums:
https://autohotkey.com/board/topic/1006 ... le-please/
Below is how I have tried to implement it:
Code: Select all
F11::
Send ^a
Send ^c
string := "Subtotal"
Loop, Parse, clipboard, `r`n
{
If A_loopfield contains %string%
{
LineNum := A_Index
break
}
}
MsgBox %LineNum%
return