Ticket #1077: Neu Textdatei.txt

File Neu Textdatei.txt, 1.3 KB (added by Mulder, 15 years ago)

The script as a txt file

Line 
1Opt("GUIOnEventMode", 1)
2
3;#include <GUIConstantsEX.au3>
4;#include <EditConstants.au3>
5#include <Constants.au3>
6#include <GUIConstants.au3>
7
8Global $GUIheight       =       520
9Global $GUIwidth        =       515
10Global $GUIcurHEIGHT    =       10
11
12Global $mainwindow      =       GUICreate("UfoAI win32 buildscript",$GUIheight,$GUIheight)
13;                               GUISetBkColor( 0x000000, $mainwindow )
14;                               GUICtrlSetDefColor( 0xC0C0C0, $mainwindow )
15                                GUISetOnEvent( $GUI_EVENT_CLOSE,        "MainWindow" )
16
17Global $Input               =   GUICtrlCreateInput( "",         10,     $GUIcurHEIGHT,  $GUIwidth-75,   20 )
18
19GUISetState()
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
50Func MainWindow()
51        If @GUI_WINHANDLE = $mainwindow Then
52                exit
53        endif
54EndFunc
55
56Func color($var1,$var2)
57        GUICtrlSetBkColor( $var1, $var2 )
58EndFunc