Enable hotkey if specific Browser-URL is accessed
Posted: 18 Aug 2018, 08:52
Hi, I want to replace a mouse key originally set to webbrowsing backwards with my own function:
- enable hotkey if Chrome Browser is active and URL "www.google ..." has been typed into address bar.
I got the following code from TLM (Administrator) which I couldn't get to work though. See link below. The problem is that "IfWinActive" seems not to be able to recognize the Chrome Browser at all. What need to be done to make this one work?
https://autohotkey.com/board/topic/8778 ... dow-title/
- enable hotkey if Chrome Browser is active and URL "www.google ..." has been typed into address bar.
I got the following code from TLM (Administrator) which I couldn't get to work though. See link below. The problem is that "IfWinActive" seems not to be able to recognize the Chrome Browser at all. What need to be done to make this one work?
https://autohotkey.com/board/topic/8778 ... dow-title/
Code: Select all
GroupAdd, MyGroup, ahk_class Chrome_WidgetWin_1 && GetWinText("www.google")
GetWinText(t) {
WinGetText, wText, A
Return RegExMatch( wText, "s)" t )
#IfWinActive ahk_group MyGroup
$XButton1::
if A_PriorHotkey <> $XButton1
{
KeyWait, XButton1
return
}
if A_TimeSincePriorHotkey > 400
{
KeyWait, XButton1
return
}
Msplit()
Return
#IfWinActive
Msplit()
{
Tooltip Yes!
}