Eli Posted January 6, 2006 Share Posted January 6, 2006 How do I count the number of characters in a string? what I want is if 'string character count' > 10 then msgbox(0, "", "NO") or........ can I limit an input to a certain amount of characters? and limit the entry to numbers only? Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 How do I count the number of characters in a string?what I want isif 'string character count' > 10 thenmsgbox(0, "", "NO")or........can I limit an input to a certain amount of characters? and limit the entry to numbers only?StringLen() Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2006 Moderators Share Posted January 6, 2006 Damn Sean.. You are all over the place today... This is a good day to quit smoking for me (no need to try and help anyone!!) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BigDod Posted January 6, 2006 Share Posted January 6, 2006 An example $len = StringLen("How long am I?") if $len > 10 Then MsgBox(0, "", "NO") EndIf Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Eli Posted January 6, 2006 Author Share Posted January 6, 2006 haha awesome...I knew I ive been looking at this too long...it was right in front of me thanks! Link to comment Share on other sites More sharing options...
seandisanti Posted January 6, 2006 Share Posted January 6, 2006 haha awesome...I knew I ive been looking at this too long...it was right in front of methanks!glad to help Link to comment Share on other sites More sharing options...
herewasplato Posted January 7, 2006 Share Posted January 7, 2006 and limit the entry to numbers only?IsNumber() [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Valuater Posted January 7, 2006 Share Posted January 7, 2006 IsNumber() maybe this ... $ES_NUMBER #include <GuiConstants.au3> ; GUI GUICreate("MY GUI") $Input_T = GUICtrlCreateInput("30", 50, 28, 40, 20, $ES_NUMBER) GUISetState() While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then Exit WEnd 8) 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