Achilles Posted September 19, 2006 Posted September 19, 2006 (edited) I alright, I have an input box, where the user will presumably put in a number, but when I do GuiCtrlRead($input) it obviously returns it as "56" (or whatever number). Then I do a check to see if the input box has been filled out and I was trying to use "Isnumber(Guictrlread($input)) but it's not working. I didn't see any thing in the helpfile (although I didn't search very hard)... any help greatly appreciated Edit: Sorry about the typo in my subject name! (But you can't change it, or so I think) Edited September 19, 2006 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
GaryFrost Posted September 19, 2006 Posted September 19, 2006 (edited) Maybe something like? If StringLen(Guictrlread($input)) Then If IsNumber(Guictrlread($input)) Then $number = Number(Guictrlread($input)) EndIf Edited September 19, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
CoderDunn Posted September 19, 2006 Posted September 19, 2006 I don't know if I misunderstood question ... but to keep the user from typing letters into the input you could just add the $ES_NUMBER style to the inputbox. Hallman
Achilles Posted September 20, 2006 Author Posted September 20, 2006 Maybe something like? If StringLen(Guictrlread($input)) Then If IsNumber(Guictrlread($input)) Then $number = Number(Guictrlread($input)) EndIf Alright, sweet, thanks for that gafrost. I used the "$number = Number(Guictrlread($input))" part and that worked fine. I didn't test the other part but I don't think it would of worked because IsNumber(GuiCtrlread($input)) would of returned string with a number in it, and that wouldn't of been accepted as a number.... at least I think that would of happened... @Hallman: No that isn't really what I was looking for but now that you mention it that would be very useful, thanks! My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
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