Sign in to follow this  
Followers 0
Black

Medium Diffuculty GUI Question

5 posts in this topic

#1 ·  Posted (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 by Black

Share this post


Link to post
Share on other sites



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


[center]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.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Black

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You had an error here

Send( "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_CLOSE

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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

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