z0mgItsJohn Posted December 15, 2008 Share Posted December 15, 2008 Eh The Title Really Doesn't Explain My Question Well.. So Here's What I'm Trying To Ask.. Can I Make A Script To Give Me All The "Numbers" From 0000 To 9999 I.E. : 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 ----- 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 ----- 0020 0021 0023 0024 0025 0026 0027 0028 0029 ----- .... 9999 Get What I'm Trying To Ask.. I Hope Someone Can Help Me.. Or Give Me An Example Script That Can Do This D: Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Ealric Posted December 15, 2008 Share Posted December 15, 2008 Eh The Title Really Doesn't Explain My Question Well.. So Here's What I'm Trying To Ask.. Can I Make A Script To Give Me All The "Numbers" From 0000 To 9999 I.E. :0000000100020003000400050006000700080009-----0010001100120013001400150016001700180019-----002000210023002400250026002700280029-----.... 9999 Get What I'm Trying To Ask.. I Hope Someone Can Help Me.. Or Give Me An Example Script That Can Do This D:What type of output are you trying to generate? Text? Variable numbers for future Array use? My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
Paulchen Posted December 15, 2008 Share Posted December 15, 2008 try for $i = 1 to 9999 ConsoleWrite(StringFormat("%04i",$i) & @CRLF) if mod($i,10) = 0 then ConsoleWrite("----" & @CRLF) Next Link to comment Share on other sites More sharing options...
Ealric Posted December 15, 2008 Share Posted December 15, 2008 (edited) _genNum(0,9999) Func _genNum($start,$end) $numberfile = FileOpen("C:\temp\numbers.txt",1) For $i = $start to $end Step 1 Select Case $i <= 9 FileWrite($numberfile,"00" & $i & @CRLF) Case $i >= 10 And $i <= 99 FileWrite($numberfile,"00" & $i & @CRLF) Case $i >= 100 And $i <= 999 FileWrite($numberfile,"0" & $i & @CRLF) Case $i > 999 FileWrite($numberfile,$i & @CRLF) EndSelect Next FileClose($numberfile) MsgBox(0,"Numbers Generated","Numbers were successfully generated.") EndFunc Change _genNum(0,9999) to whatever start/end values you want. Enjoy. Edited December 15, 2008 by Ealric My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 15, 2008 Author Share Posted December 15, 2008 try for $i = 1 to 9999 ConsoleWrite(StringFormat("%04i",$i) & @CRLF) if mod($i,10) = 0 then ConsoleWrite("----" & @CRLF)NextWow.. Thanks ^^; It Worked Like A Charm.. ^^; Latest Projects :- New & Improved TCP Chat 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