- Offizieller Beitrag
ne ne huggy, wenns läuft, braucht er ja nicht umschalten
Hier mal mit Farbänderung im Sekundentakt:
Edit: Dann werde ich den Tipp von GTASpider gleich mal mit einfügen - thx
Spoiler anzeigen
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1)
Dim $hour = @HOUR, $min = @MIN, $sec = @SEC
$SteelBlue = 0x4682B4
$White = 0xFFFFFF
Dim $arCol[60]
$arCol[0] = 0xFFEBCD
$arCol[1] = 0xFFDEAD
$arCol[2] = 0xD2B48C
$arCol[3] = 0xDEB887
$arCol[4] = 0xCD853F
$arCol[5] = 0xA0522D
$arCol[6] = 0x8B4513
$arCol[7] = 0xFFA07A
$arCol[8] = 0xE9967A
$arCol[9] = 0xF08080
$arCol[10] = 0xBC8F8F
$arCol[11] = 0xCD5C5C
$arCol[12] = 0xA52A2A
$arCol[13] = 0xDC143C
$arCol[14] = 0xFF69B4
$arCol[15] = 0xFF1493
$arCol[16] = 0xC71585
$arCol[17] = 0xFF00FF
$arCol[18] = 0x8B008B
$arCol[19] = 0x800080
$arCol[20] = 0x9400D3
$arCol[21] = 0x9932CC
$arCol[22] = 0x8A2BE2
$arCol[23] = 0x0000FF
$arCol[24] = 0x0000CD
$arCol[25] = 0x000080
$arCol[26] = 0x4169E1
$arCol[27] = 0x1E90FF
$arCol[28] = 0x00BFFF
$arCol[29] = 0x00CED1
$arCol[30] = 0x00FFFF
$arCol[31] = 0x008B8B
$arCol[32] = 0x008080
$arCol[33] = 0x48D1CC
$arCol[34] = 0x20B2AA
$arCol[35] = 0x40E0D0
$arCol[36] = 0x00FF7F
$arCol[37] = 0x32CD32
$arCol[38] = 0x00FF00
$arCol[39] = 0x008000
$arCol[40] = 0x7FFF00
$arCol[41] = 0xADFF2F
$arCol[42] = 0x9ACD32
$arCol[43] = 0xFFFF00
$arCol[44] = 0x808000
$arCol[45] = 0xFFD700
$arCol[46] = 0xDAA520
$arCol[47] = 0xB8860B
$arCol[48] = 0xFFA500
$arCol[49] = 0xFF8C00
$arCol[50] = 0xF4A460
$arCol[51] = 0xD2691E
$arCol[52] = 0xFF4500
$arCol[53] = 0xFF7F50
$arCol[54] = 0xFF6347
$arCol[55] = 0xFA8072
$arCol[56] = 0xFF0000
$arCol[57] = 0xB22222
$arCol[58] = 0x8B0000
$arCol[59] = 0x800000
$Time = GUICreate("Time", 100, 285, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION))
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
GUISetBkColor($SteelBlue)
$prHour = GUICtrlCreateProgress(15, 10, 20, 250, BitOR($PBS_SMOOTH,$PBS_VERTICAL))
$prMin = GUICtrlCreateProgress(40, 10, 20, 250, BitOR($PBS_SMOOTH,$PBS_VERTICAL))
$prSec = GUICtrlCreateProgress(65, 10, 20, 250, BitOR($PBS_SMOOTH,$PBS_VERTICAL))
$lHour = GUICtrlCreateLabel("lHour", 15, 265, 20, 17, $SS_CENTER)
GUICtrlSetColor(-1, $White)
GUICtrlSetFont(-1, 10, 600)
GUICtrlCreateLabel(":", 36, 265, 4, 17, $SS_CENTER)
GUICtrlSetColor(-1, $White)
GUICtrlSetFont(-1, 10, 600)
$lMin = GUICtrlCreateLabel("lMin", 40, 265, 20, 17, $SS_CENTER)
GUICtrlSetColor(-1, $White)
GUICtrlSetFont(-1, 10, 600)
GUICtrlCreateLabel(":", 61, 265, 4, 17, $SS_CENTER)
GUICtrlSetColor(-1, $White)
GUICtrlSetFont(-1, 10, 600)
$lSec = GUICtrlCreateLabel("lSec", 65, 265, 20, 17, $SS_CENTER)
GUICtrlSetColor(-1, $White)
GUICtrlSetFont(-1, 10, 600)
GUISetState(@SW_SHOW)
GUICtrlSetData($prHour, @HOUR*100/24)
GUICtrlSetData($lHour, @HOUR)
GUICtrlSetData($prMin, @MIN*100/60)
GUICtrlSetData($lMin, @MIN)
GUICtrlSetData($prSec, @SEC*100/60)
GUICtrlSetData($lSec, @SEC)
_HourColor()
_MinColor()
_SecColor()
While 1
Sleep(100)
If @SEC <> $sec Then
$sec = @SEC
GUICtrlSetData($prSec, @SEC*100/60)
GUICtrlSetData($lSec, @SEC)
_SecColor()
EndIf
If @MIN <> $min Then
$min = @MIN
GUICtrlSetData($prMin, @MIN*100/60)
GUICtrlSetData($lMin, @MIN)
_MinColor()
EndIf
If @HOUR <> $hour Then
$hour = @HOUR
GUICtrlSetData($prHour, @HOUR*100/24)
GUICtrlSetData($lHour, @HOUR)
_HourColor()
EndIf
WEnd
Func Close()
Exit
EndFunc
Func _SecColor()
GUICtrlSetColor($prSec, $arCol[@SEC])
EndFunc
Func _MinColor()
GUICtrlSetColor($prMin, $arCol[@MIN])
EndFunc
Func _HourColor()
Select
Case @HOUR = 0
GUICtrlSetColor($prHour, $arCol[0])
Case (@HOUR > 0) And (@HOUR < 13)
GUICtrlSetColor($prHour, $arCol[@HOUR*5-1])
Case Else
GUICtrlSetColor($prHour, $arCol[(@HOUR-12)*5-1])
EndSelect
EndFunc