Jump to content

using GUICtrlCreateInput as a button


Recommended Posts

for example instead of having a button i'd like to just hit enter after typing in input box

help file is no help for this

#include <GuiConstants.au3>

GuiCreate("MyGUI", 327, 159,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 60, 40, 220, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Input_1
        MsgBox (0,"",GuiCtrlRead ($input_1))
    Case Else
    ;;;
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

thanks for the help it works just as expected

well i was close to solving it myself but you beat me to it

this is what i was trying

#include <GUIConstants.au3>

GUICreate(" testing", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1)
GUISetState(@SW_SHOW)
$btn = GUICtrlCreateInput ("", 10,  35, 300, 20)


GuiSetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
       $msg = GUIGetMsg()
       Select
           Case $msg = $btn
               exitloop
       EndSelect
Wend
MsgBox (0, "Test", $btn)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...