1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#region ### START Koda GUI section ###
Global $tate = 4, $aCheckbox[2]
GUICreate("Status Switch", 450, 178)
$close = GUICtrlCreateButton("Beenden", 304, 120, 137, 49)
$tart = GUICtrlCreateButton("Start", 152, 120, 137, 49)
$all = GUICtrlCreateButton("All off/on", 8, 120, 137, 49)
$aCheckbox[0] = GUICtrlCreateCheckbox("Paint", 10, 39, 121, 25)
GUICtrlSetFont(-1, 12, 400, 0, "arial")
$aCheckbox[1] = GUICtrlCreateCheckbox("Notepad", 10, 80, 121, 25)
GUICtrlSetFont(-1, 12, 400, 0, "arial")
GUICtrlCreateLabel("Checkbox test", 123, 10, 191, 36)
GUICtrlSetFont(-1, 20, 800, 0, "arial")
GUICtrlSetColor(-1, 0x006AB9)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3, $close
ExitLoop
Case $tart
If BitAND(GUICtrlRead($aCheckbox[0]), 1) Then Run('mspaint.exe')
If BitAND(GUICtrlRead($aCheckbox[1]), 1) Then Run('Notepad.exe')
Case $all
$tate = BitXOR($tate, 1, 4)
For $k = 0 To 1 ;i statisch kein Ubound
GUICtrlSetState($aCheckbox[$k], $tate)
Next
EndSwitch
WEnd
|