ste Posted January 28, 2008 Share Posted January 28, 2008 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 & $ 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?? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted January 28, 2008 Developers Share Posted January 28, 2008 You have to do a GuiCtrlRead($a) ..etc to retrieve the controls content SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
picaxe Posted January 28, 2008 Share Posted January 28, 2008 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 More sharing options...
ste Posted January 28, 2008 Author Share Posted January 28, 2008 Yes Thank u... 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