Sign in to follow this  
Followers 0
myxomatosii

Can't Seem To Set GuiInput to Variable

4 posts in this topic

$ci0=GUICtrlCreateInput($a,20,30,100,20)
$hmster0=GuiCtrlRead($ci0)

doesn't work.. is there a way I can do this?

Share this post


Link to post
Share on other sites



Need more detail, why the guictrlread?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example1()

; example 1
Func Example1()
    Local $msg, $ci0
    Local $a = 10;<-- Some value

    GUICreate("My GUI",300,300) ; will create a dialog box that when displayed is centered
    $ci0=GUICtrlCreateInput($a,20,30,100,20)
    GUISetState(@SW_SHOW)     ; will display an empty dialog box

   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc  ;==>Example1

Share this post


Link to post
Share on other sites

Need more detail, why the guictrlread?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example1()

; example 1
Func Example1()
    Local $msg, $ci0
    Local $a = 10;<-- Some value

    GUICreate("My GUI",300,300); will create a dialog box that when displayed is centered
    $ci0=GUICtrlCreateInput($a,20,30,100,20)
    GUISetState(@SW_SHOW)    ; will display an empty dialog box

  ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc ;==>Example1
I'm writing a script that will use ShellExecute to send URL's in order to automate commands in a browser-game, the only variable in those URL's is the CityID which I will ask for from the user and combine that input with the rest of the URL.

Share this post


Link to post
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $msg, $ci0
Global $a = 10;<-- Some value

GUICreate("My GUI", 300, 300); will create a dialog box that when displayed is centered
$ci0 = GUICtrlCreateInput($a, 20, 30, 100, 20)
$button = GUICtrlCreateButton("Start",20,60,100,20)
GUISetState(@SW_SHOW); will display an empty dialog box

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    
    If $msg = $button Then
        MsgBox(0,"",GUICtrlRead($ci0))
    EndIf
WEnd
GUIDelete()

works fine, or didn'nt I understand the real problem?

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