djjones Posted May 20, 2009 Share Posted May 20, 2009 Hi all,I've got some dumb newbie question:need to generate four digit numbers counting from 0000 up to 9999.Have no idea how to realize it.So, please - if someone knows that - help me in.Simon Link to comment Share on other sites More sharing options...
ProgAndy Posted May 20, 2009 Share Posted May 20, 2009 This is a good task for StringFormat: $Start = 900 $Stop = 1000 $Length = 4 For $current = $Start To $Stop $formatted = StringFormat("%0"&Abs(Int($Length))&"d",$current) ConsoleWrite($formatted & @CRLF) Next *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
djjones Posted May 20, 2009 Author Share Posted May 20, 2009 Thank you ProgAndy - it rocks! Liebe Grüße 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