Jump to content

Multiple variables in GUI


keotix
 Share

Recommended Posts

Hi, i need

$var1 = InputBox("title","variable 1")
$var2 = InputBox("title","variable 2")
$var3 = InputBox("title","variable 3")

to be in 1 single gui with 2 buttons, one to submit the variables to as shown in the input boxes and one to start the script.

Any help to what to do or what to start with would be appreciated

Link to comment
Share on other sites

Maybe...

GUICreate("")

$var1 = GUICtrlCreateInput("variable 1", 50, 50, 120, 20)
$var2 = GUICtrlCreateInput("variable 2", 50, 100, 120, 20)
$var3 = GUICtrlCreateInput("variable 3", 50, 150, 120, 20)

$button = GUICtrlCreateButton("&Start", 150, 350, 80, 30)

GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = -3 Then Exit
    
    If $msg = $button Then
        $read1 = GUICtrlRead($var1)
        $read2 = GUICtrlRead($var2)
        $read3 = GUICtrlRead($var3)
        
        MsgBox(0x0, "read", $read1 & @CRLF & $read2 & @CRLF & $read3)
    EndIf

WEnd

8)

NEWHeader1.png

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