Hi,
I would like to make a new command.
Double tap on ESC key closes the window (send F4) (I know, already in the program, but I ruined it )
Triple tap send a CTRL W
So I can close a window and close a TAB in Chrome
Is this possible?
cheers,
Ruud
Double and Triple ESC key
You can still load the example from the Library - search for "Double".
This one would close the window or tab (if in Chrome) on Esc double press:
This one would close the window or tab (if in Chrome) on Esc double press:
Code: Select all
WinGetClass Class, A
If (A_ThisHotKey = A_PriorHotkey && A_TimeSincePriorHotkey < 350)
{
If (Class="Chrome_WidgetWin_1")
Send ^{vk57} ;Ctrl w
Else
Send !{F4}
}
Hi tom,
Thx for the quick reply and the perfect solution!
And also for the tip to search for the original in the library
I only had to remove the accolade from your script.
Many thanks from a almost 60 years young dutch guy who is stil learning
Cheers
Ruud
Thx for the quick reply and the perfect solution!
And also for the tip to search for the original in the library
I only had to remove the accolade from your script.
Many thanks from a almost 60 years young dutch guy who is stil learning
Cheers
Ruud
Hi Tom,
This is my first post. I'd like to create a version of this that would require a "triple Esc" instead of double. How would I do that, please?
Thanks in advance,
Michael
This is my first post. I'd like to create a version of this that would require a "triple Esc" instead of double. How would I do that, please?
Thanks in advance,
Michael
Tom wrote: ↑Jul 7th, ’20, 19:42 You can still load the example from the Library - search for "Double".
This one would close the window or tab (if in Chrome) on Esc double press:Code: Select all
WinGetClass Class, A If (A_ThisHotKey = A_PriorHotkey && A_TimeSincePriorHotkey < 350) { If (Class="Chrome_WidgetWin_1") Send ^{vk57} ;Ctrl w Else Send !{F4} }
Try this:
Code: Select all
WinGetClass Class, A
If (A_ThisHotKey = A_PriorHotkey && A_TimeSincePriorHotkey < 350)
{
PressCount:=PressCount+1
if (PressCount=2)
{
If (Class="Chrome_WidgetWin_1")
Send ^{vk57} ;Ctrl w
Else
Send !{F4}
}
}
else
PressCount:=0
return