Page 1 of 1

GuiClose: Or F3::

Posted: 09 Sep 2020, 09:33
by CorruptingNostalgia

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

Re: GuiClose: Or F3::

Posted: 09 Sep 2020, 11:45
by BoBo

Code: Select all

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

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