| 1 | Opt("GUIOnEventMode", 1)
|
|---|
| 2 |
|
|---|
| 3 | ;#include <GUIConstantsEX.au3>
|
|---|
| 4 | ;#include <EditConstants.au3>
|
|---|
| 5 | #include <Constants.au3>
|
|---|
| 6 | #include <GUIConstants.au3>
|
|---|
| 7 |
|
|---|
| 8 | Global $GUIheight = 520
|
|---|
| 9 | Global $GUIwidth = 515
|
|---|
| 10 | Global $GUIcurHEIGHT = 10
|
|---|
| 11 |
|
|---|
| 12 | Global $mainwindow = GUICreate("UfoAI win32 buildscript",$GUIheight,$GUIheight)
|
|---|
| 13 | ; GUISetBkColor( 0x000000, $mainwindow )
|
|---|
| 14 | ; GUICtrlSetDefColor( 0xC0C0C0, $mainwindow )
|
|---|
| 15 | GUISetOnEvent( $GUI_EVENT_CLOSE, "MainWindow" )
|
|---|
| 16 |
|
|---|
| 17 | Global $Input = GUICtrlCreateInput( "", 10, $GUIcurHEIGHT, $GUIwidth-75, 20 )
|
|---|
| 18 |
|
|---|
| 19 | GUISetState()
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | Local $counter, $rand1, $rand2, $color[3]=[255,00,00]
|
|---|
| 27 |
|
|---|
| 28 | while 1
|
|---|
| 29 | $counter+=1
|
|---|
| 30 | ; if $counter > 12200 then Sleep(100)
|
|---|
| 31 | GUICtrlSetData( $Input, $counter, "" )
|
|---|
| 32 | ; sleep(1)
|
|---|
| 33 | if $color[$rand2] = $rand1 then
|
|---|
| 34 | $rand1 = Random( 1, 255, 1 )
|
|---|
| 35 | $rand2 = Random( 0, 2, 1 )
|
|---|
| 36 | else
|
|---|
| 37 | if $rand1 < $color[$rand2] then
|
|---|
| 38 | $color[$rand2] -= 1
|
|---|
| 39 | else
|
|---|
| 40 | $color[$rand2] += 1
|
|---|
| 41 | endif
|
|---|
| 42 | endif
|
|---|
| 43 | ; GUICtrlSetBkColor( $Input, $color[0]*2^16 + $color[1]*2^8 + $color[2] )
|
|---|
| 44 | Color( $Input, $color[0]*2^16 + $color[1]*2^8 + $color[2] )
|
|---|
| 45 | WEnd
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | Func MainWindow()
|
|---|
| 51 | If @GUI_WINHANDLE = $mainwindow Then
|
|---|
| 52 | exit
|
|---|
| 53 | endif
|
|---|
| 54 | EndFunc
|
|---|
| 55 |
|
|---|
| 56 | Func color($var1,$var2)
|
|---|
| 57 | GUICtrlSetBkColor( $var1, $var2 )
|
|---|
| 58 | EndFunc
|
|---|