– I want to add a second code to this script, where if the window that's active is "chrome.exe" it will activate a window called "chrome.png"
can you tell me how I should add this to the script ?
Code: Select all
#a:: ; Win + A
MouseGetPos,,, Hwnd
WinGet, PN, ProcessName, % "ahk_id " Hwnd
If (PN = "WINWORD.EXE") ; Specify the window title here.
WinActivate, Word.png ;Activate first window with "Exchange" somewhere in the title
Return
GuiClose:
ExitApp
Code: Select all
If (PN = "Chrome.EXE") ; Specify the window title here. WinActivate, Chrome.png ;Activate first window with "Exchange" somewhere in the titleReturn