Jump to content

GuiCtrlCreateInput


ste
 Share

Recommended Posts

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 ;)

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...