Hello,
How can I get Line and Column numbers of a Notepad window?
Get Line and Column numbers of a Notepad window? Topic is solved
Re: Get Line and Column numbers of a Notepad window? Topic is solved
This works for me in Win10:
Code: Select all
StatusBarGetText, StatusText, 2, ahk_class Notepad
MsgBox, % StatusText
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Re: Get Line and Column numbers of a Notepad window?
Thanks this gets it successfully.
Code: Select all
2::
WinGet, window_id, ID, A
StatusBarGetText, StatusText, 2, ahk_id %window_id%
RegExMatch(StatusText, "(?<=Ln )\d*", line_number)
RegExMatch(StatusText, "(?<=Col )\d*", column_number)
MsgBox, % "line number: " line_number "`ncolumn number: " column_number
return