ESC don work as normal

Get help with using AutoHotkey and its commands and hotkeys
Posts: 46
Joined: 22 Jul 2016, 01:11

ESC don work as normal

15 Feb 2019, 16:53


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

Code: Select all

{	GUI, hide
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: 1308
Joined: 23 Feb 2016, 19:45
Location: Denmark

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
or you can use the gui event label

Code: Select all

    GUI, hide
Please excuse my spelling I am dyslexic.

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, Bing [Bot], effel, Google [Bot], RyantheCoder, SAbboushi and 51 guests