Sign in to follow this  
Followers 0
ste

GuiCtrlCreateInput

4 posts in this topic

Hi I'm Stefano and I'm Italian...exscuse me for my school english

When in a gui I put a GuiCtrlCreateInput it doesn't give me the text written in it but the number of the string...

for example if i write:

CODE
#include <GUIConstants.au3>

GuiCreate("Example", 250, 180)

$a=GuiCtrlCreateInput("Insert text here", 10, 30, 130, 20)

$b=GuiCtrlCreateInput("Insert text here", 10, 60, 130, 20)

$c=GuiCtrlCreateButton("OK", 75, 150, 100, 20)

GUISetState()

While 1

Switch GUIGetMsg()

Case $GUI_EVENT_CLOSE

Exit

Case $c

MsgBox(0,"example",$a & $:P

Exit

EndSwitch

WEnd

in the msgbox it gives me 34 (because $a and $b are the third and the fourth string) and not the text written

What is the error?? :D

Thanks ;)

Share this post


Link to post
Share on other sites



Hi Stefano, $a and $b are the controlid's. Try this

#include <GUIConstants.au3>
GUICreate("Example", 250, 180)
$a = GUICtrlCreateInput("Insert text here", 10, 30, 130, 20)
$b = GUICtrlCreateInput("Insert text here", 10, 60, 130, 20)
$c = GUICtrlCreateButton("OK", 75, 150, 100, 20)
GUISetState()
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $c
            MsgBox(0, "example", GUICtrlRead($a) & GUICtrlRead($B))
            Exit
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Yes :D

Thank u...

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