How to close inputbox Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
MonuKashyap
Posts: 33
Joined: 06 Jun 2016, 21:32

How to close inputbox

Post by MonuKashyap » 23 Jun 2018, 03:28

How to close inpoutbox by Esc button?
like :

inputbox, var
msgbox % var
Return

Esc::
inputbox close ;;---here (only inputbox, not the whole script.)
Return


THanks in advance.
trust_me
Posts: 57
Joined: 29 Jul 2017, 10:46

Re: How to close inputbox  Topic is solved

Post by trust_me » 23 Jun 2018, 08:16

Code: Select all

InputBox, z ,input
msgbox canceled by user


esc::
ControlClick,Cancel ,input
return
garry
Posts: 1456
Joined: 22 Dec 2013, 12:50

Re: How to close inputbox

Post by garry » 24 Jun 2018, 03:47

Code: Select all

#singleinstance,force
InputBox, z ,input
if ErrorLevel
   msgBox, CANCEL was pressed.
else if (z="")
   msgbox,Input is empty
else   
   msgbox,%z%
return
MonuKashyap
Posts: 33
Joined: 06 Jun 2016, 21:32

Re: How to close inputbox

Post by MonuKashyap » 21 Jul 2018, 07:25

trust_me wrote:

Code: Select all

InputBox, z ,input
msgbox canceled by user


esc::
ControlClick,Cancel ,input
return

working!!
Thanks Men..
MonuKashyap
Posts: 33
Joined: 06 Jun 2016, 21:32

Re: How to close inputbox

Post by MonuKashyap » 21 Jul 2018, 07:26

garry wrote:

Code: Select all

#singleinstance,force
InputBox, z ,input
if ErrorLevel
   msgBox, CANCEL was pressed.
else if (z="")
   msgbox,Input is empty
else   
   msgbox,%z%
return

Thanks You too friend.
this also work for me.
Post Reply

Return to “Ask For Help”