ESC don work as normal

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Calvin
Posts: 48
Joined: 22 Jul 2016, 01:11

ESC don work as normal

15 Feb 2019, 16:53

Hallo

My program is making a Gui and I want to close it with ESC

Code: Select all

esc::
{	GUI, hide
	return
}
But when the GUI is hided (fine) but other programs do not "know" if I hit esc again.

What do I do to make esc work to hide my gui when my gui is shown and when the gui is hidden the esc should work normal to other programs.

Thanks for you answers.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: ESC don work as normal

15 Feb 2019, 17:06

You can either make the hotkey context sensitive using

Code: Select all

#IfWinActive the title of your window
    Esc::GUI, hide
#IfWinActive
or you can use the gui event label

Code: Select all

GuiEscape:
    GUI, hide
return
Please excuse my spelling I am dyslexic.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, madensuyu1, peter_ahk and 349 guests