I am using AutoIt to generate 2 random numbers that act as unique seed numbers for an external program. Even though I have compiled the script into an exe, running 2 instances of the exe simultaneously somehow means that the random numbers generated are exactly the same. Can anyone shed some light as to why this is happening?
This is the log output of the 2 instances for each exe, showing: $DataFile, Random($Seed1), Random($Seed2)
Instance 1:
F:\Garbage_Squid\GarbageSquid1-1
0x74719660
0x81142742
F:\Garbage_Squid\GarbageSquid1-2
0x06222057
0x78780455
F:\Garbage_Squid\GarbageSquid1-3
0x35456052
0x27343546
F:\Garbage_Squid\GarbageSquid1-4
0x10657744
0x32951169
Instance 2:
G:Garbage_Squid\GarbageSquid1-1
0x74719660
0x81142742
G:Garbage_Squid\GarbageSquid1-2
0x06222057
0x78780455
G:Garbage_Squid\GarbageSquid1-3
0x35456052
0x27343546
G:Garbage_Squid\GarbageSquid1-4
0x10657744
0x32951169
etc.
I can get around this issue by using a unique identifier and scrambling the random number but I'm so curious as to why the random function is behaving this way!