Ticket #2183: au3bug2183.au3

File au3bug2183.au3, 1.7 KB (added by jmichae3@…, 13 years ago)

better test program that shows sequence and problem

Line 
1msgbox(0,"WAIT","wait 10 seconds")
2local $y=((@YEAR-1)    * 1000 * 60 * 60 * 24 * 31 * 12)
3local $mo=((@MON-1)    * 1000 * 60 * 60 * 24 * 31)
4local $d= ((@MDAY-1)   * 1000 * 60 * 60 * 24)
5local $h=(@HOUR        * 1000 * 60 * 60)
6local $mi=(@MIN        * 1000 * 60)
7local $s=(@SEC         * 1000)
8local $ms=@MSEC
9local $a1,$b1,$c1, $a2,$b2,$c2, $a3,$b3,$c3
10
11$a1=$y+$mo+$d+$h+$mi+$s+$ms
12$b1=BitAND($a1, 0x7fffffff)
13SRandom($b1)
14$c1=Random(1,200,1)
15Sleep(5000)
16
17$y=((@YEAR-1)    * 1000 * 60 * 60 * 24 * 31 * 12)
18$mo=((@MON-1)    * 1000 * 60 * 60 * 24 * 31)
19$d= ((@MDAY-1)   * 1000 * 60 * 60 * 24)
20$h=(@HOUR        * 1000 * 60 * 60)
21$mi=(@MIN        * 1000 * 60)
22$s=(@SEC         * 1000)
23$ms=@MSEC
24$a2=$y+$mo+$d+$h+$mi+$s+$ms
25$b2=BitAND($a2, 0x7fffffff)
26SRandom($b2)
27$c2=Random(1,200,1)
28Sleep(5000)
29$y=((@YEAR-1)    * 1000 * 60 * 60 * 24 * 31 * 12)
30$mo=((@MON-1)    * 1000 * 60 * 60 * 24 * 31)
31$d= ((@MDAY-1)   * 1000 * 60 * 60 * 24)
32$h=(@HOUR        * 1000 * 60 * 60)
33$mi=(@MIN        * 1000 * 60)
34$s=(@SEC         * 1000)
35$ms=@MSEC
36$a3=$y+$mo+$d+$h+$mi+$s+$ms
37$b3=BitAND($a3, 0x7fffffff)
38SRandom($b3)
39$c3=Random(1,200,1)
40
41local $s=""
42$s&="Pass 1:"&@crlf
43$s&="original 64-bit timestamp:"&$a1&@crlf
44$s&="32-bit BitAND on timestamp:"&$b1&@crlf
45$s&="SRandom($timestamp) then Random(1,200,1):"&$c1&@crlf
46$s&=@crlf
47$s&="Pass 2:"&@crlf
48$s&="original 64-bit timestamp:"&$a2&@crlf
49$s&="32-bit BitAND on timestamp:"&$b2&@crlf
50$s&="SRandom($timestamp) then Random(1,200,1):"&$c2&@crlf
51$s&=@crlf
52$s&="Pass 3:"&@crlf
53$s&="original 64-bit timestamp:"&$a3&@crlf
54$s&="32-bit BitAND on timestamp:"&$b3&@crlf
55$s&="SRandom($timestamp) then Random(1,200,1):"&$c3&@crlf
56$s&=@crlf
57msgbox(0,"3-passes of SRandom() and bitand()",$s)
58