Jump to content

Reading a Input box


Recommended Posts

I made a simple gui and I want to know how to read the input box so that when I press a button it will run what is in the inputbox. :)

#include <GUIConstants.au3>

$Form1 = GUICreate("launch test", 307, 372, 237, 256)

$Input1 = GUICtrlCreateInput("Path of file", 32, 272, 233, 21, -1, $WS_EX_CLIENTEDGE)

;Create a button
$Button1 = GUICtrlCreateButton("Launch", 192, 328, 75, 25)

GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

  • Moderators

I made a simple gui and I want to know how to read the input box so that when I press a button it will run what is in the inputbox. :)

#include <GUIConstants.au3>

$Form1 = GUICreate("launch test", 307, 372, 237, 256)

$Input1 = GUICtrlCreateInput("Path of file", 32, 272, 233, 21, -1, $WS_EX_CLIENTEDGE)

;Create a button
$Button1 = GUICtrlCreateButton("Launch", 192, 328, 75, 25)

GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        
    EndSelect
WEnd
Exit
$MyInput = GUICtrlRead($Input1)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...