P
PsyB
Can anyone tell me how to get a *PROPER* random number? I have defined a
variable as follows:
set randnumber=%random%
When querying the contents of my variable %randnumber% when staying
inside the CMD prompt without an exit, the variable, of course, is
randomized. However since my script takes exactly the same amount of
time to run each time it is run, the random number will always be the
same since the %random% variable is never seeded properly (indeed it
follows the same progression of "random" numbers each and every time
that CMD is started). I have tried various way to cause inconsistency in
how fast the script is executed including netstat, ping and dir -
anything that might change the execution time so that the number pulled
from the pool is different, though no matter what I have tried I end up
centering around a single number. Is there any way to generate a real
random number on CMD? Or is there any way to seed the CMD line with the
time or some other variable that would allow a better randomization? Use
of pause is out of the question, though, as this needs to be a
transparent script.
--
-=[PsyB]=-
Greater in battle than the man who would conquer a thousand-thousand men
is he who would conquer just one - *himself*.
--Dhammapada--
variable as follows:
set randnumber=%random%
When querying the contents of my variable %randnumber% when staying
inside the CMD prompt without an exit, the variable, of course, is
randomized. However since my script takes exactly the same amount of
time to run each time it is run, the random number will always be the
same since the %random% variable is never seeded properly (indeed it
follows the same progression of "random" numbers each and every time
that CMD is started). I have tried various way to cause inconsistency in
how fast the script is executed including netstat, ping and dir -
anything that might change the execution time so that the number pulled
from the pool is different, though no matter what I have tried I end up
centering around a single number. Is there any way to generate a real
random number on CMD? Or is there any way to seed the CMD line with the
time or some other variable that would allow a better randomization? Use
of pause is out of the question, though, as this needs to be a
transparent script.
--
-=[PsyB]=-
Greater in battle than the man who would conquer a thousand-thousand men
is he who would conquer just one - *himself*.
--Dhammapada--