GuiClose: Or F3::

Get help with using AutoHotkey and its commands and hotkeys
CorruptingNostalgia
Posts: 10
Joined: 17 Apr 2020, 08:44

GuiClose: Or F3::

09 Sep 2020, 09:33

Code: Select all

GuiClose:
Gui, New
Gui, Add, Text,,Are you sure you want to exit this application?
Gui, Add, Button, g1, Continue
Gui, Show, Center, Msgbox
Return

F3::
Gui, New
Gui, Add, Text,,Are you sure you want to exit this application?
Gui, Add, Button, g1, Continue
Gui, Show, Center, Msgbox
Return

As you can see here, Pressing F3 and Closing the GUI does the same thing. I was wondering if you could shorten this so you that the codes is something like this:

Code: Select all

GuiClose: Or F3::
Gui, New
Gui, Add, Text,,Are you sure you want to exit this application?
Gui, Add, Button, g1, Continue
Gui, Show, Center, Msgbox
Return
[Mod edit: [code][/code] tags added.]


Thanks in advance
BoBo
Posts: 4362
Joined: 13 May 2014, 17:15

Re: GuiClose: Or F3::

09 Sep 2020, 11:45

Code: Select all

Gui, Add, Edit,,% "Text"
Gui, Show,, Test
Return

F12::
GuiClose:
GuiEscape:
	MsgBox % "Moin!"
	ExitApp
Tested.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], roysubs and 34 guests