hi arbeite gerade an einem programm wo prozentangaben vorkommen und hba mich koda die farbe ausgewählt ist aber trozdem grün.
Spoiler anzeigen
$i = 100
$du = 100
$d = 0
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Progress1 = GUICtrlCreateProgress(40, 240, 150, 17)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0xC0C0C0)
$Progress2 = GUICtrlCreateProgress(264, 240, 150, 17)
GUICtrlSetColor(-1, 0x3D95FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$a = (Chr(Random(97, 122, 1)))
$b = (Chr(Random(97, 122, 1)))
If $a = "w" Or $a = "a" Then
If $du <=0 Then
MsgBox(0,"","Gewonnen")
$i = 100
$du = 100
EndIf
If $i <=0 Then
MsgBox(0,"","Game Over")
$i = 100
$du = 100
EndIf
If $d = 2 Then $i = $i -1
If $d = 1 Then $du = $du -1
If Not($du >=0) Then MsgBox(0,"","Gewonnen")
EndIf
If $d = 2 Then
$d = -1
EndIf
$d = $d +1
GUICtrlSetData($Progress1,$i)
GUICtrlSetData($Progress2,$du)
WEnd