Jump to content

01 as number


Recommended Posts

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

  • Moderators

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?

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

  • Moderators

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...