Reputation: 4170
I can't seem to figure this out
On autohotkey, there's documentation on how to identify a window / program running.
Google Chrome and Google Chromium both use the same ahk_class
and the same .exe name of chrome.exe
How does one use something like winTitle
or winGet
to distinguish the difference? I tried looking into PID values but they don't seem to be consistent.
EDIT via WinSpy++
Using winspy++, I ran a simple experiment. 2 Chromium Windows and 2 Chrome Windows so I can have a control group. Differences:
0F2C0000
, Chromium shows A2820000
00003528 (13608)
, Chromium shows 00001B74 (7028)
00003524 (13604)
, Chromium 00000220 (544)
Upvotes: 1
Views: 580
Reputation: 10593
To get the full path of the active window process use this:
F1::
WinGet, Path, ProcessPath, A
MsgBox, %Path%
return
Upvotes: 1
Reputation: 10593
In this case you have two possibilities to distinguish between the two programs:
(1) Using SetTitleMatchMode 2 and the part of the title that all windows of this program have in common:
SetTitleMatchMode 2
If WinExist("- Chromium")
WinActivate
(2) Using "ahk_exe Path":
If WinExist("ahk_exe full_path_of_the_executable_chrome.exe")
WinActivate
Upvotes: 1
Reputation: 4170
Using Windows Spy (came with autohotkey). Is not the same as winspy++
To access Windows Spy found here:
Differences are found in WinTitle
Upvotes: 0