GodForsakenSoul Posted December 22, 2009 Posted December 22, 2009 the only form of random number gen i can think of is. dim $n $n=Random(1,10,1) and even that is not exactly random because most of the hits are 1-5. once in a while i get more. is there anything more random then Random()? (see what i did there? ;D)
99ojo Posted December 22, 2009 Posted December 22, 2009 Hi, as you can see: #include <array.au3> Dim $arrandom [11] [2] For $i = 1 To 10 $arrandom [$i] [0] = $i $arrandom [$i] [1] = 0 Next $count = 0 While $count <= 100000 $n=Random(1,10,1) $arrandom [_ArraySearch ($arrandom, $n)] [1] = $arrandom [_ArraySearch ($arrandom, $n)] [1] + 1 $count += 1 WEnd _ArrayDisplay ($arrandom) i will get at least about 10000 for each number. ;-)) Stefan
Das Ami Posted December 22, 2009 Posted December 22, 2009 How random does it need to be? You could record the mouse movements of the user, I guess that's the closest to true randomization there is. (this method is also used by Putty)
trancexx Posted December 22, 2009 Posted December 22, 2009 (edited) the only form of random number gen i can think of is. dim $n $n=Random(1,10,1) and even that is not exactly random because most of the hits are 1-5. once in a while i get more. is there anything more random then Random()? (see what i did there? ;D) Random() is good. You are interpreting something wrong when you say that. Run this to see how 'random' is Random(): #include <Array.au3> Global $iNum Global $aArray[11] For $i = 1 To 200000 $iNum = Random(0, 10, 1) $aArray[$iNum] += 1 Next _ArrayDisplay($aArray) Question is what do you see when that array is displayed to you. Edited December 22, 2009 by trancexx ♡♡♡ . eMyvnE
GodForsakenSoul Posted December 22, 2009 Author Posted December 22, 2009 How random does it need to be? You could record the mouse movements of the user, I guess that's the closest to true randomization there is. (this method is also used by Putty)as random as possible. there will be not much mouse moves... i think...also, i don't know how to record mouse movements XD;;
jchd Posted December 22, 2009 Posted December 22, 2009 as random as possible. there will be not much mouse moves... i think...also, i don't know how to record mouse movements XD;;Of course, replace "random" by pseudo-random everywhere.AFAIK the algorithm implemented by AutoIt Random() is excellent and passes whatever test you need for layman applications.OTOH if you feel you need cryptographic-level pseudo-random input, then rely on proven layers. But do you really need that?I wouldn't bet my life (nor yours) on how "random" mice movements can be. That's in my view a very bad choice compared to a well know algorithm with proven track record and demonstrated properties. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
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