NSearch Posted December 19, 2005 Posted December 19, 2005 Is there any way to format numbers to a certain length. I want to increment a number by one each time I go through a while loop, but I want the result to be: 001 002 003 004 005 Instead of: 1 2 3 4 5 I can not seem to find any help in the online documentation. Thanks.
w0uter Posted December 19, 2005 Posted December 19, 2005 stringformat My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
CyberSlug Posted December 19, 2005 Posted December 19, 2005 ; w0uter's method For $count = 5 to 15 MsgBox(4096,"", StringFormat("%03u", $count)) Next ;Another way to think about the problem For $count = 5 to 15 If $count < 10 Then MsgBox(4096,"", "00" & $count) ElseIf $count < 100 Then MsgBox(4096,"", "0" & $count) Else MsgBox(4096,"", $count) EndIf Next Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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