Stuempi Posted June 6, 2009 Posted June 6, 2009 Hi there, another simple question from Mr. Simpleton (me ): How can I count the characters that were input into my GuiCtrlCreateInput? I tried some things with strings but all to no success... I want to count the characters and give a message box when the characters are below 5 and another one, wenn exactly five were added (because I set the maximum to 5 characters for the input field). My code looks like this: $input = GuiCtrlCreateInput("", 125, 210, 50, 20, $ES_UPPERCASE ) GuiCtrlSetLimit($input, 5) $test = GuiCtrlRead($input) If $test <= 5 Then MsgBox("", "Test", "Test") Else MsgBox("", "Test", "Test2") EndIf But obviously (again ) my script isn't working as intended... any ideas?
Bowmore Posted June 6, 2009 Posted June 6, 2009 Hi there, another simple question from Mr. Simpleton (me ): How can I count the characters that were input into my GuiCtrlCreateInput? I tried some things with strings but all to no success... I want to count the characters and give a message box when the characters are below 5 and another one, wenn exactly five were added (because I set the maximum to 5 characters for the input field). My code looks like this: $input = GuiCtrlCreateInput("", 125, 210, 50, 20, $ES_UPPERCASE ) GuiCtrlSetLimit($input, 5) $test = GuiCtrlRead($input) If $test <= 5 Then MsgBox("", "Test", "Test") Else MsgBox("", "Test", "Test2") EndIf But obviously (again ) my script isn't working as intended... any ideas? test = StringLen(GuiCtrlRead($input)) "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
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