Page 1 of 1

ahk_class For Two Softwares

Posted: 23 Feb 2020, 05:13
by Justgogoal
Problem´╝Ü
I have two softwares,They're CentBrowser and SwichHosts,The problem is that they have the same ahk_class,both of are:Chrome_WidgetWin_1
So I can not use aotohotkey to control these two softs entirely.


I need help:
Is there a a way that i can modifies or customizes a software's s ahk_class by myself :?:

Code: Select all

IfWinNotExist ahk_class Chrome_WidgetWin_1
{
    Run C:\CentBrowser\Application\chrome.exe
    WinActivate
}
Else IfWinNotActive ahk_class Chrome_WidgetWin_1
{
    WinActivate
}
Else
{
    WinMinimize
}

Code: Select all

IfWinNotExist ahk_class Chrome_WidgetWin_1
{
    Run C:\SwitchHosts\SwitchHosts!.exe
    WinActivate
}
Else IfWinNotActive ahk_class Chrome_WidgetWin_1
{
    WinActivate
}
Else
{
    WinMinimize
}

Re: ahk_class For Two Softwares

Posted: 23 Feb 2020, 05:31
by ahk7
Don't use ahk_class but ahk_exe chrome.exe and ahk_exe switchhost!.exe - problem solved ?