creamauto Posted October 20, 2006 Share Posted October 20, 2006 okay..i want autoit to enter 01 in a text box, then i am making it loop trying to add 1 to the 01 like i have: while 1 $defnumber= 01 If $defnumber= 01 then $defnumber= $defnumber +1 EndIf wend but the problem is it never enters the 0 infront so i tried while 1 $defnumber= "01" If $defnumber= 01 then $defnumber= $defnumber +1 EndIf wend but still i get 2 as input then 3 ect... but i need it to go 01, 02, 03 entering in the textbox, then finally once if defnumber= 09 then $defnumber= 10 and ect.... plz help me, thanks Link to comment Share on other sites More sharing options...
MHz Posted October 20, 2006 Share Posted October 20, 2006 If you want to pad zero's to the left of you integer, then you may need to use StringFormat(). Link to comment Share on other sites More sharing options...
creamauto Posted October 20, 2006 Author Share Posted October 20, 2006 (edited) you mean like: $defnumber= StringFormat("01") if so, how would i edit : If $defnumber= "01" then $defnumber= $defnumber +1 EndIf how would i edit that? Edited October 20, 2006 by creamauto Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 20, 2006 Moderators Share Posted October 20, 2006 you mean like:$defnumber= StringFormat("01")if so, how would i edit : If $defnumber= "01" then $defnumber= $defnumber +1 EndIfhow would i edit that?Did you bother to look at StringFormat() in the help file on how to use it, before you posted the murderous code above? 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...
creamauto Posted October 20, 2006 Author Share Posted October 20, 2006 no,. im a noob ok? -__- im having trouble just rtying to loop a variable $num= 0 and loop it until $num= 9 -____- Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 20, 2006 Moderators Share Posted October 20, 2006 no,. im a noob ok? -__- im having trouble just rtying to loop a variable $num= 0 and loop it until $num= 9 -____-No... It's not ok... You've been a part of the forum for several months. You should know the first thing you would want to do before using a function is to 1. Look at what it does and 2. How to impliment it. 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...
xcal Posted October 20, 2006 Share Posted October 20, 2006 In all fairness, as good as the help file is, the StringFormat() part could be a little clearer and use more examples. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Confuzzled Posted October 26, 2006 Share Posted October 26, 2006 Agreed...(Try doing string formats in Fortran!) Link to comment Share on other sites More sharing options...
PaulIA Posted October 26, 2006 Share Posted October 26, 2006 Try doing string formats in Fortran!Oh man, I just got a cold shiver down my spine. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
GaryFrost Posted October 26, 2006 Share Posted October 26, 2006 Oh man, I just got a cold shiver down my spine.lol, been there.... SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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