Black Posted August 13, 2006 Share Posted August 13, 2006 (edited) Hi, I am very new to AutoIt and I have made a few multifunction GUI's but I am completely stumped on even where to start on a certain GUI. I am trying to make a gui where it has an input box and that input is taken and put into a certain part of a script. For example. I made a program to type text into a certain chat program repeatedly. Right now it is a set block of text, but i would like to try and make it where you type what you want into an input box and it is made as the text to type. I would be very gracious if anyone could help me out with this. IF you could provide me with a rugh outline for this that would be awesome. Edited August 13, 2006 by Black Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 13, 2006 Moderators Share Posted August 13, 2006 $Input = GUICtrlCreateInput('Input Box', 10, 10, 100, 20) .... Then where ever you want to find out the value of it, GUICtrlRead($Input) << contains the text of the Input control. 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 More sharing options...
Black Posted August 13, 2006 Author Share Posted August 13, 2006 (edited) #include <GUIConstants.au3> GUICreate("My GUICtrlRead"); will create a dialog box that when displayed is centered $n1=GUICtrlCreateInput('', 10, 10, 100, 20) $n2=GUICtrlCreateButton ("button",0,100) GUICtrlSetState(-1,$GUI_FOCUS) ; the focus is on this button GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() if $msg = $n2 then msgbox(0,"list=", GUICtrlRead($n1)); display the value WinActivate("game info - Notepad") Send( "GUICtrlRead($n1)) endif Until $msg = $GUI_EVENT_CLOSE This is what I have so far, but i cannot figure out how to get what i put in the input box to by typed? Edited August 13, 2006 by Black Link to comment Share on other sites More sharing options...
Valuater Posted August 13, 2006 Share Posted August 13, 2006 (edited) You had an error hereSend( "GUICtrlRead($n1))this worked ( notepad = "Untitled" )#include <GUIConstants.au3> GUICreate("My GUICtrlRead"); will create a dialog box that when displayed is centered $n1=GUICtrlCreateInput('', 10, 10, 100, 20) $n2=GUICtrlCreateButton ("button",0,100) GUICtrlSetState(-1,$GUI_FOCUS) ; the focus is on this button GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() if $msg = $n2 then msgbox(0,"list=", GUICtrlRead($n1)); display the value WinActivate("Untitled") Send( GUICtrlRead($n1)) endif Until $msg = $GUI_EVENT_CLOSE8) Edited August 13, 2006 by Valuater Link to comment Share on other sites More sharing options...
Black Posted August 13, 2006 Author Share Posted August 13, 2006 TY very much. I just finished my prog today. If anyone would like to trade progs wit me xfire=blackberetpv2 email=John.w.Morse@US.ARMY.MIL Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now