iHonda Posted March 23, 2006 Share Posted March 23, 2006 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.au3P.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 More sharing options...
NegativeNrG Posted March 23, 2006 Share Posted March 23, 2006 Not to sound harsh but, this isn't really a number generator(it is in some cases..), because your using the random() func, which really does all the generating for you. [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
cppman Posted March 23, 2006 Share Posted March 23, 2006 (edited) 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 March 23, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 ok well then it uses some1 elses alagor..... (w/e i cant spell it) to spit out a random number between 9999 and 9999999 A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
blindwig Posted March 23, 2006 Share Posted March 23, 2006 ok well then it uses some1 elses alagor..... (w/e i cant spell it) to spit out a random number between 9999 and 9999999I 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? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
iHonda Posted March 24, 2006 Author Share Posted March 24, 2006 .... just look at the script thats wut i did A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 24, 2006 Share Posted March 24, 2006 (edited) .... just look at the script thats wut i didthat's pretty cool.. Edited March 24, 2006 by slightly_abnormal 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