why this does not work in chrome's tabs area? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

why this does not work in chrome's tabs area?

08 Mar 2023, 22:35

With a simple script, which I want to see the right click menu when I double click in tabs area. In the following startup test, right click menu only shows when I double click in web page area, not in the upper area. Anybody please tell me what's wrong?

Code: Select all

~LButton::

If (A_TimeSincePriorHotkey<400) and (A_TimeSincePriorHotkey<>-1)
{
MouseGetPos,xpos,ypos
sleep,50
if ( WinActive("ahk_class Chrome_WidgetWin_1") ) 
     {
        MouseClick, right
     }
ToolTip,% ypos
}
Return
User avatar
mikeyww
Posts: 27139
Joined: 09 Sep 2014, 18:38

Re: why this does not work in chrome's tabs area?

08 Mar 2023, 22:56

Hello,

Window Spy can tell you the WinTitle information for any target window or area.
joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

Re: why this does not work in chrome's tabs area?

08 Mar 2023, 22:59

Thanks for your help. I tried and that info is the same in all areas in chrome.
User avatar
mikeyww
Posts: 27139
Joined: 09 Sep 2014, 18:38

Re: why this does not work in chrome's tabs area?  Topic is solved

08 Mar 2023, 23:25

Code: Select all

#Requires AutoHotkey v1.1.33
#If WinActive("ahk_class Chrome_WidgetWin_1")
~LButton Up::MouseClick , R,,, A_PriorKey = "LButton"
              && A_TimeSincePriorHotkey < 400 && A_TimeSincePriorHotkey > 0
#If
Last edited by mikeyww on 08 Mar 2023, 23:31, edited 2 times in total.
joshatt
Posts: 151
Joined: 07 Dec 2014, 08:41

Re: why this does not work in chrome's tabs area?

08 Mar 2023, 23:29

mikeyww wrote:
08 Mar 2023, 23:25

Code: Select all

#Requires AutoHotkey v1.1.33
#If WinActive("ahk_class Chrome_WidgetWin_1")
~LButton Up::MouseClick , R,,, A_Priorkey = "LButton" && A_TimeSincePriorHotkey < 400 && A_TimeSincePriorHotkey > 0
#If
Works like a charm! Much appreciate it.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: imnewtoahk and 100 guests