Jump to content
Sign in to follow this  

Input box question

Recommended Posts


Hi everybody. I was wondering if someone could help me here. I am using the AutoBuilder 0.4.2 that CyberSlug created. This is a great tool as it is helping me learn the gui building process. I have one question though. If I made a script like:

;Script generated by AutoBuilder 0.4

Opt("GUICoordMode", 1)

Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 392,273,(@DesktopWidth-392)/2, (@DesktopHeight-273)/2 , 0x04CF0000)

$input_1 = GUISetControl("input", "Name", 10, 10, 150, 40)


While 1


$msg = GuiMsg(0)


Case $msg = -3


Case $msg = 0


Case $msg = $input_1

msgbox(0, "Your name", "You typed " & $input_1)




in the 4th line from the end it says that when someone types something into the input box and hits enter, I would like it to display what they typed. I know this sounds stupid to be able to do, but I was wondering how to go about doing it. When I type something and hit enter now, it says that I typed 1. (I am guessing that is the return code for me hitting enter from the input box....) How can I use what the user typed in and do something with it? I am looking at being able to have a box in a gui I have created to do macro's, start programs, etc. and I want to have one input box where the user can type something and when they hit enter, have it open google.com with their input as a search......

Any ideas?? Thank you all!

Share this post

Link to post
Share on other sites

use GuiRead($input_1) to retrieve the value of the control :ph34r:

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.