Jump to content

Can A Script Tell Me All Possible Combinations.. From 0000 To 9999


Recommended Posts

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

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:

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

_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 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

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...