Wb-FreeKill Posted January 11, 2005 Share Posted January 11, 2005 $newkey = GUICtrlCreateInput("78787", 130, 286, 250, 20) If $msg = $key_yes Then MsgBox(0, "Test",$newkey) - Returns "25" ???? $len = StringLen($newkey) MsgBox(0, "String length is:", $len) - Returns "2" - bacause 25 have to char EndIf Why the F*** is my msgbox returning 25? Note that im doing this betweek two GUI's in the same script, can this have an effect on it? can't it read the $newkey, and then returns the error "25"? or what Link to comment Share on other sites More sharing options...
SlimShady Posted January 11, 2005 Share Posted January 11, 2005 (edited) I guess you didn't read the help file.My help file says:Return Value Success: Returns the identifier (controlID) of the new control. Failure: Returns 0. RemarksTo obtain the value of the control see GUICtrlRead.To set or change information in the control see GUICtrlSet....I updated your code:$newkey = GUICtrlCreateInput("78787", 130, 286, 250, 20) If $msg = $key_yes Then $input_value = GUICtrlRead($newkey) MsgBox(0, "Test", $input_value) $len = StringLen($input_value) MsgBox(0, "String length is:", $len) EndIf Edited January 11, 2005 by SlimShady Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 11, 2005 Author Share Posted January 11, 2005 I guess you didn't read the help file.My help file says:I updated your code:$newkey = GUICtrlCreateInput("78787", 130, 286, 250, 20) If $msg = $key_yes Then $input_value = GUICtrlRead($newkey) MsgBox(0, "Test", $input_value) $len = StringLen($input_value) MsgBox(0, "String length is:", $len) EndIf<{POST_SNAPBACK}>Ahh, sry i didnt read it, were out to lunch I thought about the GUIRead (as it was in the old beta) just thought it didnt existed anymore! 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