Sign in to follow this  
Followers 0
keotix

Hello, new and need help

6 posts in this topic

Hello, i am trying to make a GUI with 3-4 text boxes and a run script button. i know how to do this, but not code it properly.

when text is put into the 3-4 boxes i want the text to be put later in the script (so do i make variables?& how).

when the run script button is submitted, i want the text submitted in the text boxes to be written in separate parts of the script.

thanks.

Share this post


Link to post
Share on other sites



Does this help. Its ugly as shit but it works...

#include <GUIConstants.au3>

GUICreate("test", 150, 100)
GUISetState()
$input1 = GUICtrlCreateInput("", 5, 5, 60)
$button1 = GUICtrlCreateButton("OK", 100, 5)
$input2 = GUICtrlCreateInput("", 5, 35, 60)
$button2 = GUICtrlCreateButton("OK", 100, 35)
$input3 = GUICtrlCreateInput("", 5, 65, 60)
$button3 = GUICtrlCreateButton("OK", 100, 65)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_Event_Close
            Exit 0
        Case $msg = $button1
            $data1 = GUICtrlRead($input1)
            ControlSetText("test", "", $input1, "")
            MsgBox(0, "", $data1, 3)
        Case $msg = $button2
            $data2 = GUICtrlRead($input2)
            ControlSetText("test", "", $input2, "")
            MsgBox(0, "", $data2, 3)
        Case $msg = $button3
            $data3 = GUICtrlRead($input3)
            ControlSetText("test", "", $input3, "")
            MsgBox(0, "", $data3, 3)
    EndSelect
WEnd

While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites

Thank you, ill play around with it and see if i can get it to the thing. =]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Removed script, solved

Edited by keotix

Share this post


Link to post
Share on other sites

bump can someone help me finish my script please, use that code in post above, and add a GUI with 2 text boxes so when its submitted, it says that text.

Share this post


Link to post
Share on other sites

You know more about what your script is doing than I do, but here is a good example on making the 'Send()' variable depending on response...

$FirstWord1 = InputBox("Input Text","Type what you want to send now.")

$FirstWord2 = InputBox("Input Text","Type what you want to send now.")

Send($FirstWord1)

Send($FirstWord2)

Sorry if that isn't much help.

P.S. Thanks to FireLordZi for supplying me with some very helpful info... :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0