Get window title/hwnd from process name?
Get window title/hwnd from process name?
How can I do it?
Re: Get window title/hwnd from process name?
You might use the ahk_exe option for the WinTitleparameter.
Re: Get window title/hwnd from process name?
Code: Select all
processName := "notepad.exe"
if (WinExist("ahk_exe " . processName)){
WinGetTitle, title, ahk_exe %processName%
MsgBox The title of the window is %title%
} else {
MsgBox The process "%ProcessName%" doesn't exist.
}
Re: Get window title/hwnd from process name?
Ok thank you!
Who is online
Users browsing this forum: filipemb, Joey5, ShatterCoder, Xaucy and 203 guests