DoubleMcLovin Posted March 2, 2010 Share Posted March 2, 2010 (edited) I'm working on a downloader script, I have the server configuration all set but my integers keep showing up as 01 rather than 001. I have it set as $x = 000 and then increment through $x += 1 Edited March 2, 2010 by DoubleMcLovin Link to comment Share on other sites More sharing options...
Beege Posted March 2, 2010 Share Posted March 2, 2010 Check out function StringFormat. Should be able to do what your looking for. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted March 2, 2010 Author Share Posted March 2, 2010 That is by far one of the most confusing man pages I have read so far... After about 20minutes of fiddling with it I am still unable to properly manipulate this command. If there is anyone that can help me understand this command or show me how to do this I would be much abliged. I got as far as: $volume = StringFormat("%%02 = [%02]\n", $volume) which did me no good at all... My current alternative is about 15 variations of If $chapter < 10 Then $curl &= "-00" ElseIf $chapter < 100 $curl &= "-0" ElseIf $chapter >= 100 $curl &= "-" EndIf And that just looks terrible all over my code (I would seriously need about 15 instances of that format of code... this should be able to be done with like 2 lines declaring that they must be 2 or 3 digits... Link to comment Share on other sites More sharing options...
Beege Posted March 2, 2010 Share Posted March 2, 2010 You want your numbers 001 002 003 and so on right? If so look at this. For $i = 1 to 100 $x = StringFormat('%03s', $i) ConsoleWrite( $x & @CRLF) Next Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator 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