Converting string to a number

4 posts in this topic

Achilles 1

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)

Achilles 1

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!