Jump to content

My Random # Generator


iHonda
 Share

Recommended Posts

Ok I got this idea from the guy that was trying to make a number randomiser but yeah. i made this one just to see if i could actually do it. ( i kind of suck at everything :) ) but anyway all it uses is the Random() function with really big numbers for its lease and greatest.

Here is the download for the script if you just want the executable click the link in my sig http://www.autoitscript.com/fileman/users/Zmaster/NUMBER%20MAN/NUMBER%20MAN.au3

P.S. some1 please tell me if the name is in use already so that i can change it

A great place to start Autoit 1-2-3

Link to comment
Share on other sites

Yeah... if ur trying to make your own Random Number algorithm, u can't use the built in Random() function...

Trying to make your own Random Number Algorithm is like Making your own Random() function...

here's a little example:

the min, and max variables are'nt really MIN and MAX... they are just variables to give the random number a little variation.

#include <array.au3>
Func _rand($min, $max)
    $time = TimerStart()
    $a = $min * $max
    $b = $a / @SEC
    If @SEC > 30 Then
        $seed = 22
    Else
        $seed = sqrt(@min * @sec)
    EndIf
    $c = $seed * $b - sqrt(2*@min+@hour)
    $array = _ArrayCreate(0, 10, 20, 30, 40, 50, 60)
    $d = $c / sqrt($array[5]) + sqrt($array[6]) + sqrt($array[1])
    $e = $d - 100
    For $i = 1 to 100
        $c = TimerInit()
        $d = TimerDiff($c)
        $a += ($d+sqrt($d))
    Next
    $call = $a^2
    $f = $a * $call + ($max-$min)^2 / 2
    $f += 23
    $f = round($f)
    $f = $f / 5
    $f = round($f)
    $f = $f / 3
    $f = round($f)
    $f = $f / 2
    $f = round($f/2)
    $f = round($f-150)
    Return $f
EndFunc
Edited by CHRIS95219
Link to comment
Share on other sites

ok well then it uses some1 elses alagor..... (w/e i cant spell it) to spit out a random number between 9999 and 9999999

I don't get it. If you want a random number between 9999 and 9999999, can't you just use Random(9999,9999999)? Why would you need to write a UDF to do this?
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...