Lets take Google Chrome for the sake of simplicity (correct me if I'm wrong)
Based on my understanding:
Process is the .exe application "chrome.exe"
Window Title is the title of the palette under task bar *lets say if I just opened up the chrome the Window Title is gonna be: "New Tab - Google Chrome" as shown below
My code:
Code: Select all
Process, Exist, chrome.exe ; checks if Program.exe is running
WinGetTitle, DetectedWindowName, ahk_exe ; detects the windows title of the Program.exe (e.g. "New Tab - Google Chrome")
IfWinActive, %DetectedWindowName% ; if the window is active
MsgBox, The active window is "%DetectedWindowName%"
Class1