GDIPlus Digitaluhr

  • Hallo,
    ich habe hier mal eine Digitaluhr mit GDIPlus geschrieben, ich hoffe, sie gefällt euch. Über Rück- und Fehlermeldungen würde ich mich freuen!8)
    Funktionen (per Kontextmenü erreichbar):
    -Always on Top: Ja/Nein
    -Farbe ändern: Rot/Grün/Blau/Lila/Orange/Gelb/Weiß
    -Transparenz einstellbar: Nicht transparent/Schwach transparent/Halb transparent/Ganz transparent
    -Einstellungen werden in einer Konfigurationsdatei gespeichert (auch die Position)

    Update (V. 3):
    -Man kann den Hintergrund jetzt ganz transparent machen
    -Farbwechsel funktioniert wieder richtig

    Getestet unter Windows 7 64-Bit

  • Es flackert zwar ein bisschen, aber sonst: Top Arbeit!

    Zitat

    [Heute, 11:39] Raupi: Soll ich es dir machen?
    [Heute, 11:47] BugFix: "Soll ich es dir machen? " - also Raupi !! bitte nicht so öffentlich :rofl:

    Zitat

    [Heute, 11:51] BugFix: und ich werde es mir jetzt machen - das Mittagessen :P

    AMsg UDF v1.00.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%
    OwnStyle UDF Version 1.10.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%

  • Die Uhr find ich gut, aber sie stürtzt beim [x]-klicken ab!
    Die Errormeldung unter Ubuntu 9.10 mit Wine:

    Spoiler anzeigen

    >"C:\Programme\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "Z:\home\tobias\Desktop\GDIPlus DigitalUhr.au3"
    Unhandled exception: page fault on read access to 0x42a00004 in 32-bit code (0x693b82fc).
    Register dump:
    CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
    EIP:693b82fc ESP:008ce82c EBP:008ce854 EFLAGS:00010206( R- -- I - -P- )
    EAX:00000002 EBX:693e6ff4 ECX:008ce890 EDX:693d6360
    ESI:42a00000 EDI:004a5920
    Stack dump:
    0x008ce82c: 00414da6 004a5920 010b8b30 008cec78
    0x008ce83c: 008ce87c 00414da6 009e0000 693b60ba
    0x008ce84c: 693e6ff4 001e2248 008ce884 693d63af
    0x008ce85c: 42a00000 004a5920 008ce850 008ce854
    0x008ce86c: 008cfea8 00418b20 a67f7b47 693d636a
    0x008ce87c: 008cec78 693a0000 008ce8c4 004120a1
    Backtrace:
    =>0 0x693b82fc GdipDeleteCustomLineCap+0x2c() in gdiplus (0x008ce854)
    1 0x693d63af GdipDeletePen+0x4f() in gdiplus (0x008ce884)
    2 0x004120a1 in autoit3 (+0x120a1) (0x008ce8c4)
    3 0x004752ae in autoit3 (+0x752ae) (0x008cec38)
    4 0x00406f92 in autoit3 (+0x6f92) (0x00000011)
    5 0x00000000 (0x00000000)
    0x693b82fc GdipDeleteCustomLineCap+0x2c in gdiplus: movl 0x4(%esi),%eax
    Modules:
    Module Address Debug info Name (126 modules)
    PE 400000- 4c8000 Export autoit3
    ELF 68000000-6813c000 Deferred libwine.so.1
    ELF 6813c000-68155000 Deferred libpthread.so.0
    ELF 68155000-68299000 Deferred libc.so.6
    ELF 68299000-6829d000 Deferred libdl.so.2
    ELF 6829d000-682b4000 Deferred libnsl.so.1
    ELF 682b4000-682bf000 Deferred libnss_nis.so.2
    ELF 682bf000-682cb000 Deferred libnss_files.so.2
    ELF 682cb000-682e6000 Deferred wsock32<elf>
    \-PE 682d0000-682e6000 \ wsock32
    ELF 682e6000-68310000 Deferred ws2_32<elf>
    \-PE 682f0000-68310000 \ ws2_32
    ELF 68310000-68330000 Deferred iphlpapi<elf>
    \-PE 68320000-68330000 \ iphlpapi
    ELF 68330000-68344000 Deferred libresolv.so.2
    ELF 68344000-6835e000 Deferred version<elf>
    \-PE 68350000-6835e000 \ version
    ELF 6835e000-68372000 Deferred lz32<elf>
    \-PE 68360000-68372000 \ lz32
    ELF 68372000-683f9000 Deferred winmm<elf>
    \-PE 68380000-683f9000 \ winmm
    ELF 683f9000-68545000 Deferred user32<elf>
    \-PE 68410000-68545000 \ user32
    ELF 68545000-6860f000 Deferred comctl32<elf>
    \-PE 68550000-6860f000 \ comctl32
    ELF 6860f000-68632000 Deferred mpr<elf>
    \-PE 68620000-68632000 \ mpr
    ELF 68632000-68689000 Deferred wininet<elf>
    \-PE 68640000-68689000 \ wininet
    ELF 68689000-686e6000 Deferred shlwapi<elf>
    \-PE 686a0000-686e6000 \ shlwapi
    ELF 686e6000-686fc000 Deferred psapi<elf>
    \-PE 686f0000-686fc000 \ psapi
    ELF 686fc000-68711000 Deferred userenv<elf>
    \-PE 68700000-68711000 \ userenv
    ELF 68711000-687c4000 Deferred comdlg32<elf>
    \-PE 68720000-687c4000 \ comdlg32
    ELF 687c4000-687f8000 Deferred winspool<elf>
    \-PE 687d0000-687f8000 \ winspool
    ELF 687f8000-688f4000 Deferred ole32<elf>
    \-PE 68810000-688f4000 \ ole32
    ELF 688f4000-68962000 Deferred rpcrt4<elf>
    \-PE 68900000-68962000 \ rpcrt4
    ELF 68962000-689e1000 Deferred libfreetype.so.6
    ELF 689e1000-68a0e000 Deferred libfontconfig.so.1
    ELF 68a0e000-68a35000 Deferred libexpat.so.1
    ELF 68a35000-68ad4000 Deferred winex11<elf>
    \-PE 68a40000-68ad4000 \ winex11
    ELF 68ad4000-68add000 Deferred libsm.so.6
    ELF 68add000-68af8000 Deferred libice.so.6
    ELF 68af8000-68c27000 Deferred libx11.so.6
    ELF 68c27000-68c2c000 Deferred libuuid.so.1
    ELF 68c2c000-68c30000 Deferred libxau.so.6
    ELF 68c30000-68c4e000 Deferred libxcb.so.1
    ELF 68c4e000-68c53000 Deferred libxdmcp.so.6
    ELF 68c53000-68c56000 Deferred libxinerama.so.1
    ELF 68c56000-68c5f000 Deferred libxrandr.so.2
    ELF 68c5f000-68c65000 Deferred libxfixes.so.3
    ELF 68c65000-68c70000 Deferred libxcursor.so.1
    ELF 68c70000-68ca8000 Deferred winealsa<elf>
    \-PE 68c80000-68ca8000 \ winealsa
    ELF 68caa000-68e3a000 Deferred shell32<elf>
    \-PE 68cc0000-68e3a000 \ shell32
    ELF 68e3d000-68e7d000 Deferred libpulse.so.0
    ELF 68e7d000-68ec7000 Deferred libpulsecommon-0.9.19.so
    ELF 68ec7000-68ecd000 Deferred libxtst.so.6
    ELF 68ecd000-68ed6000 Deferred libwrap.so.0
    ELF 68ed6000-68f42000 Deferred libsndfile.so.1
    ELF 68f42000-68f7b000 Deferred libdbus-1.so.3
    ELF 68f7b000-68fcb000 Deferred libflac.so.8
    ELF 68fcb000-690c7000 Deferred libvorbisenc.so.2
    ELF 690c7000-690f0000 Deferred libvorbis.so.0
    ELF 690f0000-690f7000 Deferred libogg.so.0
    ELF 690f7000-690fe000 Deferred libasound_module_pcm_pulse.so
    ELF 690fe000-69117000 Deferred msacm32<elf>
    \-PE 69100000-69117000 \ msacm32
    ELF 69117000-6913d000 Deferred msacm32<elf>
    \-PE 69120000-6913d000 \ msacm32
    ELF 6913d000-69170000 Deferred uxtheme<elf>
    \-PE 69140000-69170000 \ uxtheme
    ELF 69170000-69190000 Deferred localspl<elf>
    \-PE 69180000-69190000 \ localspl
    ELF 69190000-691a9000 Deferred spoolss<elf>
    \-PE 691a0000-691a9000 \ spoolss
    ELF 691a9000-691ee000 Deferred libcups.so.2
    ELF 691ee000-6921b000 Deferred libgssapi_krb5.so.2
    ELF 6921b000-692c3000 Deferred libgnutls.so.26
    ELF 692c3000-692cf000 Deferred libavahi-common.so.3
    ELF 692cf000-692e0000 Deferred libavahi-client.so.3
    ELF 692e0000-6930b000 Deferred libk5crypto.so.3
    ELF 6930b000-6930f000 Deferred libcom_err.so.2
    ELF 6930f000-69313000 Deferred libkeyutils.so.1
    ELF 69313000-6938f000 Deferred libgcrypt.so.11
    ELF 6938f000-69394000 Deferred libgpg-error.so.0
    ELF 69394000-693ed000 Export gdiplus<elf>
    \-PE 693a0000-693ed000 \ gdiplus
    ELF 69866000-6986e000 Deferred libnss_compat.so.2
    ELF 6aa2b000-6aa40000 Deferred system.drv16.so
    PE 6aa30000-6aa40000 Deferred system.drv16
    ELF 6b178000-6b18e000 Deferred libz.so.1
    ELF 6bb2d000-6bb31000 Deferred libxcomposite.so.1
    ELF 700ea000-700ff000 Deferred midimap<elf>
    \-PE 700f0000-700ff000 \ midimap
    ELF 70376000-70380000 Deferred libxrender.so.1
    ELF 712ce000-712d4000 Deferred libxxf86vm.so.1
    ELF 71aba000-71b81000 Deferred libasound.so.2
    ELF 72b3e000-72b50000 Deferred libtasn1.so.3
    ELF 7328e000-732b4000 Deferred libm.so.6
    ELF 73792000-737ea000 Deferred advapi32<elf>
    \-PE 737a0000-737ea000 \ advapi32
    ELF 748c6000-748cf000 Deferred librt.so.1
    ELF 75d92000-75da2000 Deferred libxext.so.6
    ELF 77541000-775f3000 Deferred libkrb5.so.3
    ELF 77c76000-77c7f000 Deferred libkrb5support.so.0
    ELF 77d7e000-77e1e000 Deferred gdi32<elf>
    \-PE 77d90000-77e1e000 \ gdi32
    ELF 7a689000-7a6aa000 Deferred imm32<elf>
    \-PE 7a690000-7a6aa000 \ imm32
    ELF 7b779000-7b796000 Deferred ld-linux.so.2
    ELF 7b800000-7b972000 Deferred kernel32<elf>
    \-PE 7b820000-7b972000 \ kernel32
    ELF 7bc00000-7bcb3000 Deferred ntdll<elf>
    \-PE 7bc10000-7bcb3000 \ ntdll
    ELF 7bf00000-7bf04000 Deferred <wine-loader>
    ELF 7c65f000-7c744000 Deferred oleaut32<elf>
    \-PE 7c680000-7c744000 \ oleaut32
    Threads:
    process tid prio (all id:s are in hex)
    0000000e
    00000034 0
    0000002b 0
    0000001d 0
    0000001c 0
    00000015 0
    00000010 0
    0000000f 0
    00000019
    00000022 0
    00000021 0
    0000001e 0
    0000001b 0
    0000001a 0
    00000023
    00000024 0
    00000028
    0000002d 0
    0000002c 0
    0000002a 0
    00000029 0
    0000002e
    0000003f 0
    0000002f 0
    00000040 (D) C:\Programme\AutoIt3\AutoIt3.exe
    00000013 0
    00000041 0 <==
    Backtrace:
    =>0 0x693b82fc GdipDeleteCustomLineCap+0x2c() in gdiplus (0x008ce854)
    1 0x693d63af GdipDeletePen+0x4f() in gdiplus (0x008ce884)
    2 0x004120a1 in autoit3 (+0x120a1) (0x008ce8c4)
    3 0x004752ae in autoit3 (+0x752ae) (0x008cec38)
    4 0x00406f92 in autoit3 (+0x6f92) (0x00000011)
    5 0x00000000 (0x00000000)
    >Exit code: -1073741819 Time: 33.850


    Ach ja: Es währe vielleicht geschickter, wenn du nur die Zahlen ändern würdest, die sich auch verändern (Also nicht 11:16:06 sondern nur 11:16:06)
    mfg tobi_girst

    MfG. tobi_girst

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tobi_girst« (Morgen, 25:63)

  • @H2112: Danke für das Lob, das Flackern hab ich entfernt!
    tobi_girst: Die Fehlermeldungen kann ich mir nicht erklären, bei mir (XP Pro) geht's.

    Einmal editiert, zuletzt von xp_fan (27. Dezember 2009 um 11:36)

    • Offizieller Beitrag

    @xp_fan: Schön gemacht, aber der Neustart nach der Farbauswahl funktioniert nicht.
    Ich habe die Funktion "Farbe" mal angepasst, sodass es mit einem 32Bit- und einem 64Bit-Windows funktioniert:

    [autoit]


    Func _Farbe($active, $notactive)
    AdlibUnRegister("_Update")
    GUIDelete()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    $param1 = String($active)
    $param2 = String($notactive)
    $s2 = String(@ScriptName)
    If @OSType = 'X86' Then
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.exe' ; für 32 Bit
    Else
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3_x64.exe' ; für 64 Bit
    EndIf
    Run(Chr(34) & $autoit & Chr(34) & " " & $s2 & " " & $param1 & " " & $param2)
    Exit
    EndFunc ;==>_Farbe

    [/autoit]
  • Hi,
    habe die Uhr mal auf 50 Zeilen zusammengekürzt :D
    Geht bestimmt NOCH kürzer, aber dafür hatte ich keinen Nerv...wenn man für die 4 "Trennpunkte" 6 Zeilen opfern muss, hört der Spass auf :P
    Kommentare sind reichlich vorhanden, kann sein, daß die Logik für Anfänger etwas schwer verständlich ist, aber für Erklärungen sind wir ja da!

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Dim $ws[12] = [0, 0, 10, -7, 50, -7, 60, 0, 50, 7, 10, 7] ;Koordinaten Polygonzug: von links nach rechts WAAGRECHTER Balken, von rechts nach links SENKRECHTER Balken
    Dim $ziffer[10] = [239, 10, 118, 94, 154, 220, 253, 14, 254, 222] ;alle gesetzten bits des Indexes in der 7-segmentanzeige ergeben die Ziffer
    Dim $balkenpos[8] = [0, "60.0", "0.0", "60.60", "0.60", "0.60", "0.120", "0.0"] ;position der Leuchtbalken der 7-Segmentanzeige innerhalb der Ziffer
    Dim $p[7][2] ;nimmt die polygonzug-koordinaten zum Zeichnen auf
    $p[0][0] = 6 ;6 Punkte im Polygonzug

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hgui = GUICreate('Uhr', 620, 175, -1, -1, $WS_POPUP) ;GUI erstellen ohne Rahmen
    Global $hWnd = WinGetHandle($hgui) ;Handle holen
    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd) ;"Leinwand" erstellen, auf der gezeichnet werden kann
    GUICtrlCreateLabel("", 0, 0, 620, 175, Default, $GUI_WS_EX_PARENTDRAG) ;verschieben des Fensters möglich machen durch 2. Fenster
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;das 2. Fenster transparent machen
    GUISetBkColor(0x000000) ;Hintergrund der GUI schwarz
    GUISetState() ;GUI anzeigen
    AdlibRegister("_time", 1000) ;jede Zehntelsekunde ein Refresh der Zeitanzeige
    Do ;Endlosschleife, solange bis..
    until GUIGetMsg()=-3 ;..ESC gedrückt wird
    _GDIPlus_GraphicsDispose($hGraphic) ;freigeben
    _GDIPlus_Shutdown()

    [/autoit] [autoit][/autoit] [autoit]

    Func _time() ;Uhrzeit anzeigen :o)
    For $k = 1 To 6 ;die 6 Ziffern der Uhrzeit
    $setbits = $ziffer[StringMid(String(@HOUR & @MIN & @SEC), $k, 1)] ;gesetzte Bits in der siebensegmentanzeige anhand der Ziffer in der Uhrzeit holen
    For $bitnr = 7 To 1 Step -1 ;alle Bits durchlaufen
    _drawpolygon(BitAND($setbits, 128), $k * 100 - 80+($k=1 or $k=3 or $k=5)*20, $bitnr) ;parameter: bit gesetzt ja/nein, position der gesamten ziffer,nummer des bits(gerade=waagrechter balken, ungerade=senkrechter balken)
    $setbits = BitShift($setbits, -1) ;nächstes Bit holen
    Next
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + (@sec/2=int(@sec/2)) * 0xBB0000) ;Pinsel erstellen, wenn Ziffer gerade, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsfillEllipse($hGraphic,202,55, 15,15,$brush) ;Punkte zeichnen
    _GDIPlus_GraphicsfillEllipse($hGraphic,402,55, 15,15,$brush)
    _GDIPlus_GraphicsfillEllipse($hGraphic,202,105,15,15,$brush)
    _GDIPlus_GraphicsfillEllipse($hGraphic,402,105,15,15,$brush)
    _GDIPlus_BrushDispose($brush) ;Pinsel auflösen
    EndFunc ;==>_time

    [/autoit] [autoit][/autoit] [autoit]

    Func _drawpolygon($bit, $xpos, $bitnr) ;zeichnet einen polygonzug ("Balken") an die entsprechende Position
    $split = StringSplit($balkenpos[$bitnr], ".", 3) ;x- und y-koordinaten des Balkens innerhalb der Ziffer holen
    $b = (($bitnr / 2) = Int($bitnr / 2)) ;$bit gerade => $b = true => Balken waagrecht, ansonsten Balken senkrecht
    $step = -1 + 2 * $b ;schrittweite durch das $WS-Array
    For $i = 11 - 11 * $b To 11 * $b Step 2 * $step ;array mit waagrechten (bit=gerade) oder (Bit=ungerade) senkrechten Balken füllen
    $r = Int(Abs((11 * (Not ($b))) - $i) / 2) + 1 ;abhängig von der Reihenfolge, egal ob $i von 0 bis 11 oder von 11 bis 0, $r muss immer 1,2,3,4,5,6
    $p[$r][0] = $ws[$i] + $split[0] + $xpos ;x- und
    $p[$r][1] = $ws[$i + $step] + $split[1] + 30 ;y-position in das polygonarray schreiben
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + ($bit <> 0) * 0xBB0000) ;wenn bit gesetzt, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsFillPolygon($hGraphic, $p, $brush) ;Balken zeichnen
    _GDIPlus_BrushDispose($brush)
    EndFunc ;==>_drawpolygon

    [/autoit]
  • Andy: Danke funzt super, bitte nimm es mir nicht übel, wenn ich bei meinem Quelltext bleibe, da ich das mit den Bits noch nicht so wirklich verstehe.
    Oscar : Danke, welche OS hast Du? Bei mir lautete die Ausgabe von @OSType "WIN32_NT", daher hab' ich noch eine Abfrage dafür eingebaut, so sollte es jetzt klappen!

    Spoiler anzeigen
    [autoit]


    Func _Farbe($active, $notactive)
    AdlibUnRegister("_Update")
    GUIDelete()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    $param1 = String($active)
    $param2 = String($notactive)
    $s2 = String(@ScriptName)
    If @OSType = 'X86' Then
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.exe' ; für 32 Bit
    Else
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3_x64.exe' ; für 64 Bit
    EndIf
    If @OSType = "WIN32_NT" Then
    _RunDOS("start AutoIt3.exe " & $s2 & " " & $param1 & " " & $param2 & "")
    Else
    Run(Chr(34) & $autoit & Chr(34) & " " & $s2 & " " & $param1 & " " & $param2)
    EndIf
    Exit
    EndFunc

    [/autoit]
  • Zitat

    Andy: Danke funzt super, bitte nimm es mir nicht übel, wenn ich bei meinem Quelltext bleibe, ...

    Ich nehm nix übel, wieso auch, jeder macht sein eigenes Ding und wird glücklich damit! :thumbup:
    Ich bewundere nur immer diese Fleißarbeit, hunderte Zeilen Code zu erstellen!

    Zitat

    ...da ich das mit den Bits noch nicht so wirklich verstehe.

    Wichtig ist, dass es funktioniert! Und irgendwann kommt das knowhow von ganz alleine wenn man sich etwas mit der Materie beschäftigt und Interesse hat. Dann wird man ganz automatisch zu faul sich die Finger wund zu tippen und sucht schnellere / einfachere Möglichkeiten!

    Wobei ich zugeben muß, es mit dem obigen Script teilweise etwas übertrieben zu haben. Debuggen möchte ich das nicht^^

    ciao
    Andy


    "Schlechtes Benehmen halten die Leute doch nur deswegen für eine Art Vorrecht, weil keiner ihnen aufs Maul haut." Klaus Kinski
    "Hint: Write comments after each line. So you can (better) see what your program does and what it not does. And we can see what you're thinking what your program does and we can point to the missunderstandings." A-Jay

    Wie man Fragen richtig stellt... Tutorial: Wie man Script-Fehler findet und beseitigt...X-Y-Problem

    Einmal editiert, zuletzt von Andy (31. Dezember 2009 um 14:52)

  • Oscar : So mit @OSArch gehts super, Danke! :thumbup:
    Edit: Hab's in den ersten Post eingefügt!

    Einmal editiert, zuletzt von xp_fan (31. Dezember 2009 um 16:53)

  • Zitat

    Aber mich nervts das die Uhr stehen bleibt wenn man sie bewegt.

    Aha, und wo ist dein Script mit einer "Lösungsmöglichkeit"? Wie dein Satz richtig heißt, hab ich für die Zukunft mal beispielsweise ausgeführt:

    Zitat

    Aber mich nervts das die Uhr stehen bleibt wenn man sie bewegt, daher habe ich das Script erweitert.

    Bbenötigt wird die MouseSetOnEvent_UDF.au3

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <MouseSetOnEvent_UDF.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit]

    Dim $ws[12] = [0, 0, 10, -7, 50, -7, 60, 0, 50, 7, 10, 7] ;Koordinaten Polygonzug: von links nach rechts WAAGRECHTER Balken, von rechts nach links SENKRECHTER Balken
    Dim $ziffer[10] = [239, 10, 118, 94, 154, 220, 253, 14, 254, 222] ;alle gesetzten bits des Indexes in der 7-segmentanzeige ergeben die Ziffer
    Dim $balkenpos[8] = [0, "60.0", "0.0", "60.60", "0.60", "0.60", "0.120", "0.0"] ;position der Leuchtbalken der 7-Segmentanzeige innerhalb der Ziffer
    Dim $p[7][2] ;nimmt die polygonzug-koordinaten zum Zeichnen auf
    $p[0][0] = 6 ;6 Punkte im Polygonzug

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hgui = GUICreate('Uhr', 620, 175, -1, -1, $WS_POPUP) ;GUI erstellen ohne Rahmen
    Global $hWnd = WinGetHandle($hgui) ;Handle holen
    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd) ;"Leinwand" erstellen, auf der gezeichnet werden kann
    GUICtrlCreateLabel("", 0, 0, 620, 175, Default, $GUI_WS_EX_PARENTDRAG) ;verschieben des Fensters möglich machen durch 2. Fenster
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;das 2. Fenster transparent machen
    GUISetBkColor(0x000000) ;Hintergrund der GUI schwarz
    GUISetState() ;GUI anzeigen
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hgui)
    AdlibRegister("_time", 1000) ;jede Sekunde ein Refresh der Zeitanzeige

    [/autoit] [autoit][/autoit] [autoit]

    _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_PrimaryDown", "", "", $hGui, -1)

    [/autoit] [autoit][/autoit] [autoit]

    Do ;Endlosschleife, solange bis..
    sleep(100)
    until 0 ;..ESC gedrückt wird

    [/autoit] [autoit][/autoit] [autoit]

    func _exit()
    _GDIPlus_GraphicsDispose($hGraphic) ;freigeben
    _GDIPlus_Shutdown()
    Exit
    endfunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _time() ;Uhrzeit anzeigen :o)
    $t=timerinit()
    For $k = 1 To 6 ;die 6 Ziffern der Uhrzeit
    $setbits = $ziffer[StringMid(String(@HOUR & @MIN & @SEC), $k, 1)] ;gesetzte Bits in der siebensegmentanzeige anhand der Ziffer in der Uhrzeit holen
    For $bitnr = 7 To 1 Step -1 ;alle Bits durchlaufen
    _drawpolygon(BitAND($setbits, 128), $k * 100 - 80+($k=1 or $k=3 or $k=5)*20, $bitnr) ;parameter: bit gesetzt ja/nein, position der gesamten ziffer,nummer des bits(gerade=waagrechter balken, ungerade=senkrechter balken)
    $setbits = BitShift($setbits, -1) ;nächstes Bit holen
    Next
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + (@sec/2=int(@sec/2)) * 0xBB0000) ;Pinsel erstellen, wenn Ziffer gerade, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsfillEllipse($hGraphic,202,55, 15,15,$brush) ;Punkte zeichnen
    _GDIPlus_GraphicsfillEllipse($hGraphic,402,55, 15,15,$brush)
    _GDIPlus_GraphicsfillEllipse($hGraphic,202,105,15,15,$brush)
    _GDIPlus_GraphicsfillEllipse($hGraphic,402,105,15,15,$brush)
    _GDIPlus_BrushDispose($brush) ;Pinsel auflösen
    $m=timerdiff($t)
    ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $m = ' & $m & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_time

    [/autoit] [autoit][/autoit] [autoit]

    Func _drawpolygon($bit, $xpos, $bitnr) ;zeichnet einen polygonzug ("Balken") an die entsprechende Position
    $t=timerinit()
    $split = StringSplit($balkenpos[$bitnr], ".", 3) ;x- und y-koordinaten des Balkens innerhalb der Ziffer holen
    $b = (($bitnr / 2) = Int($bitnr / 2)) ;$bit gerade => $b = true => Balken waagrecht, ansonsten Balken senkrecht
    $step = -1 + 2 * $b ;schrittweite durch das $WS-Array
    For $i = 11 - 11 * $b To 11 * $b Step 2 * $step ;array mit waagrechten (bit=gerade) oder (Bit=ungerade) senkrechten Balken füllen
    $r = Int(Abs((11 * (Not ($b))) - $i) / 2) + 1 ;abhängig von der Reihenfolge, egal ob $i von 0 bis 11 oder von 11 bis 0, $r muss immer 1,2,3,4,5,6
    $p[$r][0] = $ws[$i] + $split[0] + $xpos ;x- und
    $p[$r][1] = $ws[$i + $step] + $split[1] + 30 ;y-position in das polygonarray schreiben
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + ($bit <> 0) * 0xBB0000) ;wenn bit gesetzt, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsFillPolygon($hGraphic, $p, $brush) ;Balken zeichnen
    _GDIPlus_BrushDispose($brush)
    $m=timerdiff($t)
    ; ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $m = ' & $m & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    EndFunc ;==>_drawpolygon

    [/autoit] [autoit][/autoit] [autoit]

    Func _PrimaryDown() ;falls maus im fenster gedrückt wird
    AdlibunRegister("_time") ;abschalten
    _time()
    AdlibRegister("_time", 1000) ;jede Sekunde ein Refresh der Zeitanzeige
    Return 0 ;Do not Block the default processing
    EndFunc

    [/autoit]
  • Gute Arbeit.
    Aber mich nervts das die Uhr stehen bleibt wenn man sie bewegt.

    Na dann probiere mal dies aus:

    Spoiler anzeigen
    [autoit]


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;scripted by xp_fan;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Process.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("TrayMenuMode", 1)
    HotKeySet("{ESC}", "_Ende")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    If $CmdLine[0] = 2 Then
    _SelectColors($CmdLine[1], $CmdLine[2])
    Else
    _SelectColors(0xFFFF0000, 0xFF440000)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    _Start()

    [/autoit] [autoit][/autoit] [autoit]

    Func _Start()

    [/autoit] [autoit][/autoit] [autoit]

    Global $aPoints1[7][2], $aPoints4[7][2]
    Global $hGUI = GUICreate("GDI+ Digitaluhr V. 1.1", 620, 175, "", "", $WS_POPUP) ;$WS_EX_LAYERED
    Global $hWnd = WinGetHandle("GDI+ Digitaluhr V. 1.1")
    GUISetBkColor(0x000000)
    Global $Label1 = GUICtrlCreateLabel("", 0, 0, 620, 175, Default, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUISetState(@SW_SHOW)
    WinSetOnTop("GDI+ Digitaluhr V. 1.1", "", 1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $counter = 0
    Global $counter2 = 0
    Global $counter3 = 0

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen1 = _GDIPlus_PenCreate($colornotactive)
    $hPen2 = _GDIPlus_BrushCreateSolid($coloractive)
    $hPen3 = _GDIPlus_BrushCreateSolid($colornotactive)

    [/autoit] [autoit][/autoit] [autoit]

    $context = GUICtrlCreateContextMenu($Label1)
    $farben = GUICtrlCreateMenu("Farben", $context)
    $rot = GUICtrlCreateMenuItem("Rot", $farben)
    $gruen = GUICtrlCreateMenuItem("Grün", $farben)
    $blau = GUICtrlCreateMenuItem("Blau", $farben)
    $lila = GUICtrlCreateMenuItem("Lila", $farben)
    $orange = GUICtrlCreateMenuItem("Orange", $farben)
    $gelb = GUICtrlCreateMenuItem("Gelb", $farben)
    $wei = GUICtrlCreateMenuItem("Weiß", $farben)
    GUICtrlCreateMenuItem("", $context)
    $www = GUICtrlCreateMenuItem("Autoit.de aufrufen", $context)
    GUICtrlCreateMenuItem("", $context)
    $aktualisieren = GUICtrlCreateMenuItem("Uhr aktualisieren", $context)
    GUICtrlCreateMenuItem("", $context)
    $about = GUICtrlCreateMenuItem("Über diese Programm", $context)
    GUICtrlCreateMenuItem("", $context)
    $exit = GUICtrlCreateMenuItem("Beenden", $context)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawEllipse($hGraphic, 196, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 196, 100, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 405, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 405, 100, 15, 15, $hPen1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen3)

    [/autoit] [autoit][/autoit] [autoit]

    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()

    [/autoit] [autoit][/autoit] [autoit]

    Global $Hour = @HOUR
    Global $Minutes = @MIN
    Global $Seconds1 = StringLeft(@SEC, 1)
    Global $Seconds2 = StringRight(@SEC, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $sleep = 100
    GUIRegisterMsg($WM_TIMER, "_Update") ;$WM_TIMER = 0x0113
    DllCall("User32.dll", "int", "SetTimer", "hwnd", $hwnd, "int", 0, "int", $sleep, "int", 0)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $rot
    _Farbe(0xFFFF0000, 0xFF440000)
    Case $gruen
    _Farbe(0xFF00FF00, 0xFF004400)
    Case $blau
    _Farbe(0xFF0000FF, 0xFF000044)
    Case $lila
    _Farbe(0xFF8B00FF, 0xFF000044)
    Case $orange
    _Farbe(0xFFFFA100, 0xFF441A00)
    Case $gelb
    _Farbe(0xFFFFFF00, 0xFF444400)
    Case $wei
    _Farbe(0xFFFFFFFF, 0xFF444444)
    Case $www
    ShellExecute("www.autoit.de")
    Case $aktualisieren
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $about
    MsgBox(262208, "Über dieses Programm", "Dieses Programm wurde von xp_fan aus der deutschen AutoIt-Community http://www.autoit.de geschrieben!" & Chr(10) & "Besonderen Dank an tobi_girst, Oscar und Andy von Autoit.de für ihre Hilfe!")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $exit
    _Ende()
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_Start

    [/autoit] [autoit][/autoit] [autoit]

    Func U1()
    $h1 = StringLeft(@HOUR, 1)
    Switch $h1
    Case 0
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U1

    [/autoit] [autoit][/autoit] [autoit]

    Func U2()
    $h2 = StringRight(@HOUR, 1)
    Switch $h2
    Case 0
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U2

    [/autoit] [autoit][/autoit] [autoit]

    Func U3()
    $h3 = StringLeft(@MIN, 1)
    Switch $h3
    Case 0
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U3

    [/autoit] [autoit][/autoit] [autoit]

    Func U4()
    $h4 = StringRight(@MIN, 1)
    Switch $h4
    Case 0
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U4

    [/autoit] [autoit][/autoit] [autoit]

    Func U5()
    $h5 = StringLeft(@SEC, 1)
    Switch $h5
    Case 0
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U5

    [/autoit] [autoit][/autoit] [autoit]

    Func U6()
    $h6 = StringRight(@SEC, 1)
    Switch $h6
    Case 0
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U6

    [/autoit] [autoit][/autoit] [autoit]

    Func _Dot()
    $hPen1 = _GDIPlus_PenCreate($colornotactive)
    $hPen2 = _GDIPlus_BrushCreateSolid($coloractive)
    $hPen3 = _GDIPlus_BrushCreateSolid($colornotactive)
    If $counter = 1 Then
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen3)
    $counter = 0
    Else
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen2)
    $counter = 1
    EndIf
    EndFunc ;==>_Dot

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Update()
    $mp = WinGetPos("GDI+ Digitaluhr V. 1.1")
    While $mp[0] And $mp[1] < -10
    $mp = WinGetPos("GDI+ Digitaluhr V. 1.1")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    $counter2 = 1
    Sleep(900)
    WEnd
    Select
    Case $counter2 = 1 And $mp[0] And $mp[1] < -10
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    $counter2 = 0
    Case @HOUR <> $Hour
    U1()
    U2()
    Case @MIN <> $Minutes
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    Case $Seconds1 <> StringLeft(@SEC, 1)
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    Case $Seconds2 <> StringRight(@SEC, 1)
    U6()
    _Dot()
    EndSelect
    $Seconds1 = StringLeft(@SEC, 1)
    $Seconds2 = StringRight(@SEC, 1)
    $Minutes = @MIN
    $Hour = @HOUR
    EndFunc ;==>_Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _7s($x, $y, $delete = 0, $c1 = $colornotactive, $c2 = $colornotactive, $c3 = $colornotactive, $c4 = $colornotactive, $c5 = $colornotactive, $c6 = $colornotactive, $c7 = $colornotactive)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Local $aPoints1[7][2], $aPoints2[7][2], $aPoints3[7][2], $aPoints4[7][2], $aPoints5[7][2], $aPoints6[7][2], $aPoints7[7][2], $hPen[14], $Graphic[14]
    If $delete = 0 Then

    [/autoit] [autoit][/autoit] [autoit]

    $Posx1 = $x
    $Posy1 = $y + 1
    $aPoints1[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[1][0] = $Posx1
    $aPoints1[1][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[2][0] = $Posx1 + 10
    $aPoints1[2][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[6][0] = $Posx1 + 10
    $aPoints1[6][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[3][0] = $Posx1 + 50
    $aPoints1[3][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[5][0] = $Posx1 + 50
    $aPoints1[5][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[4][0] = $Posx1 + 60
    $aPoints1[4][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen[0] = _GDIPlus_PenCreate($c1)
    $hPen[1] = _GDIPlus_BrushCreateSolid($c1)
    $Graphic[0] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints1, $hPen[0])
    $Graphic[1] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints1, $hPen[1])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx2 = $x
    $Posy2 = $y + 63
    $aPoints2[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[1][0] = $Posx2
    $aPoints2[1][1] = $Posy2

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[2][0] = $Posx2 + 10
    $aPoints2[2][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[6][0] = $Posx2 + 10
    $aPoints2[6][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[3][0] = $Posx2 + 50
    $aPoints2[3][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[5][0] = $Posx2 + 50
    $aPoints2[5][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[4][0] = $Posx2 + 60
    $aPoints2[4][1] = $Posy2
    $hPen[2] = _GDIPlus_PenCreate($c2)
    $hPen[3] = _GDIPlus_BrushCreateSolid($c2)
    $Graphic[2] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints2, $hPen[2])
    $Graphic[3] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints2, $hPen[3])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx3 = $x - 1
    $Posy3 = $y + 125
    $aPoints3[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[1][0] = $Posx3
    $aPoints3[1][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[2][0] = $Posx3 + 10
    $aPoints3[2][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[6][0] = $Posx3 + 10
    $aPoints3[6][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[3][0] = $Posx3 + 50
    $aPoints3[3][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[5][0] = $Posx3 + 50
    $aPoints3[5][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[4][0] = $Posx3 + 60
    $aPoints3[4][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $hPen[4] = _GDIPlus_PenCreate($c3)
    $hPen[5] = _GDIPlus_BrushCreateSolid($c3)
    $Graphic[4] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints3, $hPen[4])
    $Graphic[5] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints3, $hPen[5])

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;vertikal;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx4 = $x + 3
    $Posy4 = $y
    $aPoints4[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[1][0] = $Posx4 - 5
    $aPoints4[1][1] = $Posy4

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[2][0] = $Posx4 + 5
    $aPoints4[2][1] = $Posy4 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[3][0] = $Posx4 + 5
    $aPoints4[3][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[4][0] = $Posx4 - 5
    $aPoints4[4][1] = $Posy4 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[5][0] = $Posx4 - 5
    $aPoints4[5][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[6][0] = $Posx4 - 5
    $aPoints4[6][1] = $Posy4 + 10
    $hPen[6] = _GDIPlus_PenCreate($c4)
    $hPen[7] = _GDIPlus_BrushCreateSolid($c4)
    $Graphic[6] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints4, $hPen[6])
    $Graphic[7] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints4, $hPen[7])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx5 = $x + 3
    $Posy5 = $y + 66
    $aPoints5[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[1][0] = $Posx5 - 5
    $aPoints5[1][1] = $Posy5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[2][0] = $Posx5 + 5
    $aPoints5[2][1] = $Posy5 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[3][0] = $Posx5 + 5
    $aPoints5[3][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[4][0] = $Posx5 - 5
    $aPoints5[4][1] = $Posy5 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[5][0] = $Posx5 - 5
    $aPoints5[5][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[6][0] = $Posx5 - 5
    $aPoints5[6][1] = $Posy5 + 10
    $hPen[8] = _GDIPlus_PenCreate($c5)
    $hPen[9] = _GDIPlus_BrushCreateSolid($c5)
    $Graphic[8] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints5, $hPen[8])
    $Graphic[9] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints5, $hPen[9])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx6 = $x + 56
    $Posy6 = $y
    $aPoints6[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[1][0] = $Posx6 + 5
    $aPoints6[1][1] = $Posy6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[2][0] = $Posx6 + 5
    $aPoints6[2][1] = $Posy6 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[3][0] = $Posx6 + 5
    $aPoints6[3][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[4][0] = $Posx6 + 5
    $aPoints6[4][1] = $Posy6 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[5][0] = $Posx6 - 5
    $aPoints6[5][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[6][0] = $Posx6 - 5
    $aPoints6[6][1] = $Posy6 + 10
    $hPen[10] = _GDIPlus_PenCreate($c6)
    $hPen[11] = _GDIPlus_BrushCreateSolid($c6)
    $Graphic[10] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints6, $hPen[10])
    $Graphic[11] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints6, $hPen[11])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx7 = $x + 56
    $Posy7 = $y + 66
    $aPoints7[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[1][0] = $Posx7 + 5
    $aPoints7[1][1] = $Posy7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[2][0] = $Posx7 + 5
    $aPoints7[2][1] = $Posy7 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[3][0] = $Posx7 + 5
    $aPoints7[3][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[4][0] = $Posx7 + 5
    $aPoints7[4][1] = $Posy7 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[5][0] = $Posx7 - 5
    $aPoints7[5][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[6][0] = $Posx7 - 5
    $aPoints7[6][1] = $Posy7 + 10
    $hPen[12] = _GDIPlus_PenCreate($c7)
    $hPen[13] = _GDIPlus_BrushCreateSolid($c7)
    $Graphic[12] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints7, $hPen[12])
    $Graphic[13] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints7, $hPen[13])
    Else
    For $i = 0 To 12 Step 2
    _GDIPlus_PenDispose($hPen[$i])
    Next
    For $ii = 1 To 13 Step 2
    _GDIPlus_BrushDispose($hPen[$i])
    Next
    For $iii = 0 To 13
    _GDIPlus_GraphicsDispose($hGraphic)
    Next
    _GDIPlus_Shutdown()
    EndIf
    EndFunc ;==>_7s

    [/autoit] [autoit][/autoit] [autoit]

    Func _SelectColors($choosecoloractive = 0xFF00FF00, $choosecolornotactive = 0xFF004400)
    Global $coloractive = $choosecoloractive
    Global $colornotactive = $choosecolornotactive
    EndFunc ;==>_SelectColors

    [/autoit] [autoit][/autoit] [autoit]

    Func _Ende()
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Ende

    [/autoit] [autoit][/autoit] [autoit]

    Func _Farbe($active, $notactive)
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    GUIDelete()
    $param1 = String($active)
    $param2 = String($notactive)
    $s2 = String(@ScriptName)
    If @OSArch = 'X86' Then
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.exe' ; für 32 Bit
    Else
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3_x64.exe' ; für 64 Bit
    EndIf
    Run(Chr(34) & $autoit & Chr(34) & " " & $s2 & " " & $param1 & " " & $param2)
    Exit
    EndFunc ;==>_Farbe

    [/autoit]


    @xp-fan: du solltest die Deklaration der Variablen lieber oben schreiben, als in Funktionen!

    Gruß,
    UEZ

    • Offizieller Beitrag

    Hallo,

    wenn man statt AdlibEnable die Funktion _Timer_SetTimer nimmt bleibt die Uhr auch nicht mehr stehen!

    Spoiler anzeigen
    [autoit]


    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <Timers.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Dim $ws[12] = [0, 0, 10, -7, 50, -7, 60, 0, 50, 7, 10, 7] ;Koordinaten Polygonzug: von links nach rechts WAAGRECHTER Balken, von rechts nach links SENKRECHTER Balken
    Dim $ziffer[10] = [239, 10, 118, 94, 154, 220, 253, 14, 254, 222] ;alle gesetzten bits des Indexes in der 7-segmentanzeige ergeben die Ziffer
    Dim $balkenpos[8] = [0, "60.0", "0.0", "60.60", "0.60", "0.60", "0.120", "0.0"] ;position der Leuchtbalken der 7-Segmentanzeige innerhalb der Ziffer
    Dim $p[7][2] ;nimmt die polygonzug-koordinaten zum Zeichnen auf
    $p[0][0] = 6 ;6 Punkte im Polygonzug

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $hgui = GUICreate('Uhr', 620, 175, -1, -1, $WS_POPUP) ;GUI erstellen ohne Rahmen
    ;~ Global $hWnd = WinGetHandle($hgui) ;Handle holen
    GUICtrlCreateLabel("", 0, 0, 620, 175, Default, $GUI_WS_EX_PARENTDRAG) ;verschieben des Fensters möglich machen durch 2. Fenster
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;das 2. Fenster transparent machen
    GUISetBkColor(0x000000) ;Hintergrund der GUI schwarz
    GUISetState() ;GUI anzeigen

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()
    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui) ;"Leinwand" erstellen, auf der gezeichnet werden kann
    _time()
    _Timer_SetTimer($hgui, 1000, "_TIMER_CALLBACK")

    [/autoit] [autoit][/autoit] [autoit]

    Do ;Endlosschleife, solange bis..
    Sleep(100)
    Until GUIGetMsg() = -3 ;..ESC gedrückt wird

    [/autoit] [autoit][/autoit] [autoit]

    _Timer_KillAllTimers($hgui)
    _GDIPlus_GraphicsDispose($hGraphic) ;freigeben
    _GDIPlus_Shutdown()

    [/autoit] [autoit][/autoit] [autoit]

    Func _TIMER_CALLBACK($hWnd, $Msg, $iIDTimer, $dwTime)
    _time()
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _time() ;Uhrzeit anzeigen :o)
    For $k = 1 To 6 ;die 6 Ziffern der Uhrzeit
    $setbits = $ziffer[StringMid(String(@HOUR & @MIN & @SEC), $k, 1)] ;gesetzte Bits in der siebensegmentanzeige anhand der Ziffer in der Uhrzeit holen
    For $bitnr = 7 To 1 Step -1 ;alle Bits durchlaufen
    _drawpolygon(BitAND($setbits, 128), $k * 100 - 80 + ($k = 1 Or $k = 3 Or $k = 5) * 20, $bitnr) ;parameter: bit gesetzt ja/nein, position der gesamten ziffer,nummer des bits(gerade=waagrechter balken, ungerade=senkrechter balken)
    $setbits = BitShift($setbits, -1) ;nächstes Bit holen
    Next
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + (@SEC / 2 = Int(@SEC / 2)) * 0xBB0000) ;Pinsel erstellen, wenn Ziffer gerade, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsFillEllipse($hGraphic, 202, 55, 15, 15, $brush) ;Punkte zeichnen
    _GDIPlus_GraphicsFillEllipse($hGraphic, 402, 55, 15, 15, $brush)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 202, 105, 15, 15, $brush)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 402, 105, 15, 15, $brush)
    _GDIPlus_BrushDispose($brush) ;Pinsel auflösen
    EndFunc ;==>_time

    [/autoit] [autoit][/autoit] [autoit]

    Func _drawpolygon($bit, $xpos, $bitnr) ;zeichnet einen polygonzug ("Balken") an die entsprechende Position
    $split = StringSplit($balkenpos[$bitnr], ".", 3) ;x- und y-koordinaten des Balkens innerhalb der Ziffer holen
    $b = (($bitnr / 2) = Int($bitnr / 2)) ;$bit gerade => $b = true => Balken waagrecht, ansonsten Balken senkrecht
    $step = -1 + 2 * $b ;schrittweite durch das $WS-Array
    For $i = 11 - 11 * $b To 11 * $b Step 2 * $step ;array mit waagrechten (bit=gerade) oder (Bit=ungerade) senkrechten Balken füllen
    $r = Int(Abs((11 * (Not ($b))) - $i) / 2) + 1 ;abhängig von der Reihenfolge, egal ob $i von 0 bis 11 oder von 11 bis 0, $r muss immer 1,2,3,4,5,6
    $p[$r][0] = $ws[$i] + $split[0] + $xpos ;x- und
    $p[$r][1] = $ws[$i + $step] + $split[1] + 30 ;y-position in das polygonarray schreiben
    Next
    $brush = _GDIPlus_BrushCreateSolid(0xFF440000 + ($bit <> 0) * 0xBB0000) ;wenn bit gesetzt, dann farbig, ansonsten schwarz
    _GDIPlus_GraphicsFillPolygon($hGraphic, $p, $brush) ;Balken zeichnen
    _GDIPlus_BrushDispose($brush)
    EndFunc ;==>_drawpolygon

    [/autoit]
  • Ich danke euch für die vielen Ideen, ich habe jetzt die Lösung von UEZ eingebaut, da ich die am kürzesten finde.
    Farbe und Transparenz werden jetzt in einer *.ini gespeichert, Script im ersten Post aktualisiert.

  • Hi xp_fan,

    wenn du die Uhr raus aus dem Bildschirm bewegst, dann wird die Grafik entsprechend gelöscht und nicht aktualisiert!

    Ich war mal so frei und habe nur ein wenig deinen Code modifiziert!

    Vieles kann man bestimmt über Schleifen lösen, aber das überlasse ich dir :D

    Spoiler anzeigen
    [autoit]


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;scripted by xp_fan;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Process.au3>
    #include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    Opt("TrayMenuMode", 1)
    HotKeySet("{ESC}", "_Ende")

    [/autoit] [autoit][/autoit] [autoit]

    Global $st = IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Transparenz", "Transparenz", "255")
    Global $udc = IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Vordergrund", "0xFF00FF00")
    Global $coloractive, $choosecoloractive
    Global $colornotactive, $choosecolornotactive
    Global $hPen1, $hPen2, $hPen3

    [/autoit] [autoit][/autoit] [autoit]

    If $CmdLine[0] = 2 Then
    _SelectColors($CmdLine[1], $CmdLine[2])
    Else
    _SelectColors(IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Vordergrund", "0xFF00FF00"), IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Hintergrund", "0xFF004400"))
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Global $ini = @ScriptDir & "\GDIPlusDigitaluhr.ini"
    Global $aPoints1[7][2], $aPoints4[7][2]
    Global $title = "GDI+ Digitaluhr V. 2.0"
    Global $width = 620, $height = 175
    Global $hWnd = GUICreate($title, $width, $height, "", "", $WS_POPUP)
    GUISetBkColor(0x000000)
    Global $Label1 = GUICtrlCreateLabel("", 0, 0, $width, $height, Default, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUISetState(@SW_SHOW)
    WinSetTrans($title, "", $st)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $counter = 0
    Global $counter2 = 0
    Global $counter3 = 0

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic)
    Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    ;~ _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 4)

    [/autoit] [autoit][/autoit] [autoit]

    $context = GUICtrlCreateContextMenu($Label1)
    $farben = GUICtrlCreateMenu("Farben", $context)
    $rot = GUICtrlCreateMenuItem("Rot", $farben)
    $gruen = GUICtrlCreateMenuItem("Grün", $farben)
    $blau = GUICtrlCreateMenuItem("Blau", $farben)
    $lila = GUICtrlCreateMenuItem("Lila", $farben)
    $orange = GUICtrlCreateMenuItem("Orange", $farben)
    $gelb = GUICtrlCreateMenuItem("Gelb", $farben)
    $wei = GUICtrlCreateMenuItem("Weiß", $farben)
    $t = GUICtrlCreateMenu("Transparenz", $context)
    $nichtt = GUICtrlCreateMenuItem("Nicht transparent", $t)
    $schwacht = GUICtrlCreateMenuItem("Schwach transparent", $t)
    $halbt = GUICtrlCreateMenuItem("Halb transparent", $t)
    $ontop = GUICtrlCreateMenu("Always on Top", $context)
    $aoty = GUICtrlCreateMenuItem("Ja", $ontop)
    $aotn = GUICtrlCreateMenuItem("Nein", $ontop)
    GUICtrlCreateMenuItem("", $context)
    $www = GUICtrlCreateMenuItem("Autoit.de aufrufen", $context)
    GUICtrlCreateMenuItem("", $context)
    $aktualisieren = GUICtrlCreateMenuItem("Uhr aktualisieren", $context)
    GUICtrlCreateMenuItem("", $context)
    $about = GUICtrlCreateMenuItem("Über diese Programm", $context)
    GUICtrlCreateMenuItem("", $context)
    $exit = GUICtrlCreateMenuItem("Beenden", $context)

    [/autoit] [autoit][/autoit] [autoit]

    WinSetOnTop($title, "", 1)
    GUICtrlSetState($aoty, $GUI_CHECKED)
    Switch $udc
    Case "0xFFFF0000"
    GUICtrlSetState($rot, $GUI_CHECKED)
    Case "0xFF0000FF"
    GUICtrlSetState($blau, $GUI_CHECKED)
    Case "0xFF00FF00"
    GUICtrlSetState($gruen, $GUI_CHECKED)
    Case "0xFF8B00FF"
    GUICtrlSetState($lila, $GUI_CHECKED)
    Case "0xFFFFA100"
    GUICtrlSetState($orange, $GUI_CHECKED)
    Case "0xFFFFFF00"
    GUICtrlSetState($gelb, $GUI_CHECKED)
    Case "0xFFFFFFFF"
    GUICtrlSetState($wei, $GUI_CHECKED)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    Switch $st
    Case 255
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    Case 200
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    Case 150
    GUICtrlSetState($halbt, $GUI_CHECKED)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 196, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 196, 100, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 405, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 405, 100, 15, 15, $hPen1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen3)

    [/autoit] [autoit][/autoit] [autoit]

    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()

    [/autoit] [autoit][/autoit] [autoit]

    Global $Hour = @HOUR
    Global $Minutes = @MIN
    Global $Seconds1 = StringLeft(@SEC, 1)
    Global $Seconds2 = StringRight(@SEC, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $sleep = 50
    GUIRegisterMsg($WM_TIMER, "_Update") ;$WM_TIMER = 0x0113 ; Vielen Dank an UEZ für diesen Abschnitt
    DllCall("User32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", 0, "int", $sleep, "int", 0); Vielen Dank an UEZ für diesen Abschnitt

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $rot
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFF0000")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF220000")
    Sleep(200)
    _Farbe(0xFFFF0000, 0xFF440000)
    Case $gruen
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF00FF00")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF002200")
    Sleep(200)
    _Farbe(0xFF00FF00, 0xFF004400)
    Case $blau
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF0000FF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF000022")
    Sleep(200)
    _Farbe(0xFF0000FF, 0xFF000044)
    Case $lila
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF8B00FF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF000022")
    Sleep(200)
    _Farbe(0xFF8B00FF, 0xFF000044)
    Case $orange
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFA100")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF441A00")
    Sleep(200)
    _Farbe(0xFFFFA100, 0xFF441A00)
    Case $gelb
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFFF00")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF222200")
    Sleep(200)
    _Farbe(0xFFFFFF00, 0xFF444400)
    Case $wei
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFFFFF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF222222")
    Sleep(200)
    _Farbe(0xFFFFFFFF, 0xFF444444)
    Case $www
    ShellExecute("www.autoit.de")
    Case $nichtt
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    GUICtrlSetState($schwacht, $GUI_UNCHECKED)
    GUICtrlSetState($halbt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 255)
    IniWrite($ini, "Transparenz", "Transparenz", "255")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $schwacht
    GUICtrlSetState($schwacht, $GUI_CHECKED)
    GUICtrlSetState($halbt, $GUI_UNCHECKED)
    GUICtrlSetState($nichtt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 200)
    IniWrite($ini, "Transparenz", "Transparenz", "200")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $halbt
    GUICtrlSetState($halbt, $GUI_CHECKED)
    GUICtrlSetState($schwacht, $GUI_UNCHECKED)
    GUICtrlSetState($nichtt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 150)
    IniWrite($ini, "Transparenz", "Transparenz", "150")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $aoty
    WinSetOnTop($title, "", 1)
    GUICtrlSetState($aoty, $GUI_CHECKED)
    GUICtrlSetState($aotn, $GUI_UNCHECKED)
    Case $aotn
    WinSetOnTop($title, "", 0)
    GUICtrlSetState($aotn, $GUI_CHECKED)
    GUICtrlSetState($aoty, $GUI_UNCHECKED)
    Case $aktualisieren
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $about
    MsgBox(262208, "Über dieses Programm", "Dieses Programm wurde von xp_fan aus der deutschen AutoIt-Community http://www.autoit.de geschrieben!" & Chr(10) & "Besonderen Dank an tobi_girst, Oscar, Andy und UEZ von Autoit.de für ihre Hilfe!")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $exit
    _Ende()
    EndSwitch
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func U1()
    $h1 = StringLeft(@HOUR, 1)
    Switch $h1
    Case 0
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U1

    [/autoit] [autoit][/autoit] [autoit]

    Func U2()
    $h2 = StringRight(@HOUR, 1)
    Switch $h2
    Case 0
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U2

    [/autoit] [autoit][/autoit] [autoit]

    Func U3()
    $h3 = StringLeft(@MIN, 1)
    Switch $h3
    Case 0
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U3

    [/autoit] [autoit][/autoit] [autoit]

    Func U4()
    $h4 = StringRight(@MIN, 1)
    Switch $h4
    Case 0
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U4

    [/autoit] [autoit][/autoit] [autoit]

    Func U5()
    $h5 = StringLeft(@SEC, 1)
    Switch $h5
    Case 0
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U5

    [/autoit] [autoit][/autoit] [autoit]

    Func U6()
    $h6 = StringRight(@SEC, 1)
    Switch $h6
    Case 0
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U6

    [/autoit] [autoit][/autoit] [autoit]

    Func _Dot()
    _GDIPlus_PenSetColor($hPen1, $colornotactive)
    _GDIPlus_BrushSetSolidColor($hPen2, $coloractive)
    _GDIPlus_BrushSetSolidColor($hPen3, $colornotactive)
    If $counter = 1 Then
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen3)
    $counter = 0
    Else
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen2)
    $counter = 1
    EndIf
    EndFunc ;==>_Dot

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Update()
    Select
    Case @HOUR <> $Hour
    U1()
    U2()
    Case @MIN <> $Minutes
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    Case $Seconds1 <> StringLeft(@SEC, 1)
    U5()
    U6()
    _Dot()
    Case $Seconds2 <> StringRight(@SEC, 1)
    U6()
    _Dot()
    EndSelect
    $Seconds1 = StringLeft(@SEC, 1)
    $Seconds2 = StringRight(@SEC, 1)
    $Minutes = @MIN
    $Hour = @HOUR
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
    EndFunc ;==>_Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _7s($x, $y, $delete = 0, $c1 = $colornotactive, $c2 = $colornotactive, $c3 = $colornotactive, $c4 = $colornotactive, $c5 = $colornotactive, $c6 = $colornotactive, $c7 = $colornotactive)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Local $aPoints1[7][2], $aPoints2[7][2], $aPoints3[7][2], $aPoints4[7][2], $aPoints5[7][2], $aPoints6[7][2], $aPoints7[7][2], $hPen[14], $Graphic[14]
    If $delete = 0 Then

    [/autoit] [autoit][/autoit] [autoit]

    $Posx1 = $x
    $Posy1 = $y + 1
    $aPoints1[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[1][0] = $Posx1
    $aPoints1[1][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[2][0] = $Posx1 + 10
    $aPoints1[2][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[6][0] = $Posx1 + 10
    $aPoints1[6][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[3][0] = $Posx1 + 50
    $aPoints1[3][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[5][0] = $Posx1 + 50
    $aPoints1[5][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[4][0] = $Posx1 + 60
    $aPoints1[4][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    ;~ _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    ;~ $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen[0] = _GDIPlus_PenCreate($c1)
    $hPen[1] = _GDIPlus_BrushCreateSolid($c1)
    $Graphic[0] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints1, $hPen[0])
    $Graphic[1] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints1, $hPen[1])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx2 = $x
    $Posy2 = $y + 63
    $aPoints2[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[1][0] = $Posx2
    $aPoints2[1][1] = $Posy2

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[2][0] = $Posx2 + 10
    $aPoints2[2][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[6][0] = $Posx2 + 10
    $aPoints2[6][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[3][0] = $Posx2 + 50
    $aPoints2[3][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[5][0] = $Posx2 + 50
    $aPoints2[5][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[4][0] = $Posx2 + 60
    $aPoints2[4][1] = $Posy2
    $hPen[2] = _GDIPlus_PenCreate($c2)
    $hPen[3] = _GDIPlus_BrushCreateSolid($c2)
    $Graphic[2] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints2, $hPen[2])
    $Graphic[3] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints2, $hPen[3])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx3 = $x - 1
    $Posy3 = $y + 125
    $aPoints3[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[1][0] = $Posx3
    $aPoints3[1][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[2][0] = $Posx3 + 10
    $aPoints3[2][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[6][0] = $Posx3 + 10
    $aPoints3[6][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[3][0] = $Posx3 + 50
    $aPoints3[3][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[5][0] = $Posx3 + 50
    $aPoints3[5][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[4][0] = $Posx3 + 60
    $aPoints3[4][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $hPen[4] = _GDIPlus_PenCreate($c3)
    $hPen[5] = _GDIPlus_BrushCreateSolid($c3)
    $Graphic[4] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints3, $hPen[4])
    $Graphic[5] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints3, $hPen[5])

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;vertikal;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx4 = $x + 3
    $Posy4 = $y
    $aPoints4[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[1][0] = $Posx4 - 5
    $aPoints4[1][1] = $Posy4

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[2][0] = $Posx4 + 5
    $aPoints4[2][1] = $Posy4 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[3][0] = $Posx4 + 5
    $aPoints4[3][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[4][0] = $Posx4 - 5
    $aPoints4[4][1] = $Posy4 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[5][0] = $Posx4 - 5
    $aPoints4[5][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[6][0] = $Posx4 - 5
    $aPoints4[6][1] = $Posy4 + 10
    $hPen[6] = _GDIPlus_PenCreate($c4)
    $hPen[7] = _GDIPlus_BrushCreateSolid($c4)
    $Graphic[6] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints4, $hPen[6])
    $Graphic[7] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints4, $hPen[7])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx5 = $x + 3
    $Posy5 = $y + 66
    $aPoints5[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[1][0] = $Posx5 - 5
    $aPoints5[1][1] = $Posy5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[2][0] = $Posx5 + 5
    $aPoints5[2][1] = $Posy5 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[3][0] = $Posx5 + 5
    $aPoints5[3][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[4][0] = $Posx5 - 5
    $aPoints5[4][1] = $Posy5 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[5][0] = $Posx5 - 5
    $aPoints5[5][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[6][0] = $Posx5 - 5
    $aPoints5[6][1] = $Posy5 + 10
    $hPen[8] = _GDIPlus_PenCreate($c5)
    $hPen[9] = _GDIPlus_BrushCreateSolid($c5)
    $Graphic[8] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints5, $hPen[8])
    $Graphic[9] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints5, $hPen[9])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx6 = $x + 56
    $Posy6 = $y
    $aPoints6[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[1][0] = $Posx6 + 5
    $aPoints6[1][1] = $Posy6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[2][0] = $Posx6 + 5
    $aPoints6[2][1] = $Posy6 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[3][0] = $Posx6 + 5
    $aPoints6[3][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[4][0] = $Posx6 + 5
    $aPoints6[4][1] = $Posy6 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[5][0] = $Posx6 - 5
    $aPoints6[5][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[6][0] = $Posx6 - 5
    $aPoints6[6][1] = $Posy6 + 10
    $hPen[10] = _GDIPlus_PenCreate($c6)
    $hPen[11] = _GDIPlus_BrushCreateSolid($c6)
    $Graphic[10] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints6, $hPen[10])
    $Graphic[11] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints6, $hPen[11])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx7 = $x + 56
    $Posy7 = $y + 66
    $aPoints7[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[1][0] = $Posx7 + 5
    $aPoints7[1][1] = $Posy7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[2][0] = $Posx7 + 5
    $aPoints7[2][1] = $Posy7 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[3][0] = $Posx7 + 5
    $aPoints7[3][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[4][0] = $Posx7 + 5
    $aPoints7[4][1] = $Posy7 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[5][0] = $Posx7 - 5
    $aPoints7[5][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[6][0] = $Posx7 - 5
    $aPoints7[6][1] = $Posy7 + 10
    $hPen[12] = _GDIPlus_PenCreate($c7)
    $hPen[13] = _GDIPlus_BrushCreateSolid($c7)
    $Graphic[12] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints7, $hPen[12])
    $Graphic[13] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints7, $hPen[13])
    Else
    For $i = 0 To 12 Step 2
    _GDIPlus_PenDispose($hPen[$i])
    Next
    For $ii = 1 To 13 Step 2
    _GDIPlus_BrushDispose($hPen[$i])
    Next
    ;~ For $iii = 0 To 13
    ;~ _GDIPlus_GraphicsDispose($hGraphic)
    ;~ Next
    ;~ _GDIPlus_Shutdown()
    EndIf
    EndFunc ;==>_7s

    [/autoit] [autoit][/autoit] [autoit]

    Func _SelectColors($choosecoloractive = 0xFF00FF00, $choosecolornotactive = 0xFF002200)
    $coloractive = $choosecoloractive
    $colornotactive = $choosecolornotactive
    _GDIPlus_PenSetColor($hPen1, $colornotactive)
    _GDIPlus_BrushSetSolidColor($hPen2, $coloractive)
    _GDIPlus_BrushSetSolidColor($hPen3, $colornotactive)
    EndFunc ;==>_SelectColors

    [/autoit] [autoit][/autoit] [autoit]

    Func _Ende()
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_PenDispose($hPen1)
    _GDIPlus_BrushDispose($hPen2)
    _GDIPlus_BrushDispose($hPen3)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Ende

    [/autoit] [autoit][/autoit] [autoit]

    Func _Farbe($active, $notactive); Vielen Dank an Oscar für diese Funktion
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_PenDispose($hPen1)
    _GDIPlus_BrushDispose($hPen2)
    _GDIPlus_BrushDispose($hPen3)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    GUIDelete()
    $param1 = String($active)
    $param2 = String($notactive)
    $s2 = String(@ScriptName)
    If @OSArch = 'X86' Then
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.exe' ; für 32 Bit
    Else
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3_x64.exe' ; für 64 Bit
    EndIf
    Run(Chr(34) & $autoit & Chr(34) & " " & $s2 & " " & $param1 & " " & $param2)
    Exit
    EndFunc ;==>_Farbe

    [/autoit]


    Voraussetzung ist AutoIt v3.3.2.0!

    Gruß,
    UEZ

  • Danke, super :thumbup: ! In den ersten Post nochmal integriert.
    Ich hab' nochmal 2 Fragen an Dich:
    Wenn ich mit _WinApi_SetLayeredWindowsAttributes den Hintergrund transparent machen möchte, dann zeigt er ja die aktiven und die nicht aktiven Segmente an, kann man die nicht aktiven irgendwie ausblenden? Und noch eine Frage: Wenn ich die GUI dann verschiebe (wenn sie transparent ist), dann merke ich, dass ich einen Bildausschnitt der Arbeitsoberfläche als Hintergrund habe, kann man das unterbinden?

    Spoiler anzeigen
    [autoit]


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;scripted by xp_fan;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Process.au3>
    #include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    Opt("TrayMenuMode", 1)
    HotKeySet("{ESC}", "_Ende")

    [/autoit] [autoit][/autoit] [autoit]

    Global $st = IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Transparenz", "Transparenz", "255")
    Global $udc = IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Vordergrund", "0xFF00FF00")
    Global $coloractive, $choosecoloractive
    Global $colornotactive, $choosecolornotactive
    Global $hPen1, $hPen2, $hPen3

    [/autoit] [autoit][/autoit] [autoit]

    If $CmdLine[0] = 2 Then
    _SelectColors($CmdLine[1], $CmdLine[2])
    Else
    _SelectColors(IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Vordergrund", "0xFF00FF00"), IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Hintergrund", "0xFF004400"))
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Global $ini = @ScriptDir & "\GDIPlusDigitaluhr.ini"
    Global $aPoints1[7][2], $aPoints4[7][2]
    Global $title = "GDI+ Digitaluhr V. 2.0"
    Global $width = 620, $height = 175
    Global $hWnd = GUICreate($title, $width, $height, "", "", $WS_POPUP, $WS_EX_LAYERED)
    GUISetBkColor(0x000000)
    Global $Label1 = GUICtrlCreateLabel("", 0, 0, $width, $height, Default, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUISetState(@SW_SHOW)
    WinSetTrans($title, "", $st)

    [/autoit] [autoit][/autoit] [autoit]

    _WinAPI_SetLayeredWindowAttributes($hWnd, 0x000000); HIER

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $counter = 0
    Global $counter2 = 0
    Global $counter3 = 0

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic)
    Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    ;~ _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 4)

    [/autoit] [autoit][/autoit] [autoit]

    $context = GUICtrlCreateContextMenu($Label1)
    $farben = GUICtrlCreateMenu("Farben", $context)
    $rot = GUICtrlCreateMenuItem("Rot", $farben)
    $gruen = GUICtrlCreateMenuItem("Grün", $farben)
    $blau = GUICtrlCreateMenuItem("Blau", $farben)
    $lila = GUICtrlCreateMenuItem("Lila", $farben)
    $orange = GUICtrlCreateMenuItem("Orange", $farben)
    $gelb = GUICtrlCreateMenuItem("Gelb", $farben)
    $wei = GUICtrlCreateMenuItem("Weiß", $farben)
    $t = GUICtrlCreateMenu("Transparenz", $context)
    $nichtt = GUICtrlCreateMenuItem("Nicht transparent", $t)
    $schwacht = GUICtrlCreateMenuItem("Schwach transparent", $t)
    $halbt = GUICtrlCreateMenuItem("Halb transparent", $t)
    $ontop = GUICtrlCreateMenu("Always on Top", $context)
    $aoty = GUICtrlCreateMenuItem("Ja", $ontop)
    $aotn = GUICtrlCreateMenuItem("Nein", $ontop)
    GUICtrlCreateMenuItem("", $context)
    $www = GUICtrlCreateMenuItem("Autoit.de aufrufen", $context)
    GUICtrlCreateMenuItem("", $context)
    $aktualisieren = GUICtrlCreateMenuItem("Uhr aktualisieren", $context)
    GUICtrlCreateMenuItem("", $context)
    $about = GUICtrlCreateMenuItem("Über diese Programm", $context)
    GUICtrlCreateMenuItem("", $context)
    $exit = GUICtrlCreateMenuItem("Beenden", $context)

    [/autoit] [autoit][/autoit] [autoit]

    WinSetOnTop($title, "", 1)
    GUICtrlSetState($aoty, $GUI_CHECKED)
    Switch $udc
    Case "0xFFFF0000"
    GUICtrlSetState($rot, $GUI_CHECKED)
    Case "0xFF0000FF"
    GUICtrlSetState($blau, $GUI_CHECKED)
    Case "0xFF00FF00"
    GUICtrlSetState($gruen, $GUI_CHECKED)
    Case "0xFF8B00FF"
    GUICtrlSetState($lila, $GUI_CHECKED)
    Case "0xFFFFA100"
    GUICtrlSetState($orange, $GUI_CHECKED)
    Case "0xFFFFFF00"
    GUICtrlSetState($gelb, $GUI_CHECKED)
    Case "0xFFFFFFFF"
    GUICtrlSetState($wei, $GUI_CHECKED)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    Switch $st
    Case 255
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    Case 200
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    Case 150
    GUICtrlSetState($halbt, $GUI_CHECKED)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 196, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 196, 100, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 405, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hBackbuffer, 405, 100, 15, 15, $hPen1)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen3)

    [/autoit] [autoit][/autoit] [autoit]

    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()

    [/autoit] [autoit][/autoit] [autoit]

    Global $Hour = @HOUR
    Global $Minutes = @MIN
    Global $Seconds1 = StringLeft(@SEC, 1)
    Global $Seconds2 = StringRight(@SEC, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $sleep = 50
    GUIRegisterMsg($WM_TIMER, "_Update") ;$WM_TIMER = 0x0113 ; Vielen Dank an UEZ für diesen Abschnitt
    DllCall("User32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", 0, "int", $sleep, "int", 0); Vielen Dank an UEZ für diesen Abschnitt

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $rot
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFF0000")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF220000")
    Sleep(200)
    _Farbe(0xFFFF0000, 0xFF440000)
    Case $gruen
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF00FF00")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF002200")
    Sleep(200)
    _Farbe(0xFF00FF00, 0xFF004400)
    Case $blau
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF0000FF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF000022")
    Sleep(200)
    _Farbe(0xFF0000FF, 0xFF000044)
    Case $lila
    IniWrite($ini, "Farbe", "Vordergrund", "0xFF8B00FF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF000022")
    Sleep(200)
    _Farbe(0xFF8B00FF, 0xFF000044)
    Case $orange
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFA100")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF441A00")
    Sleep(200)
    _Farbe(0xFFFFA100, 0xFF441A00)
    Case $gelb
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFFF00")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF222200")
    Sleep(200)
    _Farbe(0xFFFFFF00, 0xFF444400)
    Case $wei
    IniWrite($ini, "Farbe", "Vordergrund", "0xFFFFFFFF")
    IniWrite($ini, "Farbe", "Hintergrund", "0xFF222222")
    Sleep(200)
    _Farbe(0xFFFFFFFF, 0xFF444444)
    Case $www
    ShellExecute("www.autoit.de")
    Case $nichtt
    GUICtrlSetState($nichtt, $GUI_CHECKED)
    GUICtrlSetState($schwacht, $GUI_UNCHECKED)
    GUICtrlSetState($halbt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 255)
    IniWrite($ini, "Transparenz", "Transparenz", "255")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $schwacht
    GUICtrlSetState($schwacht, $GUI_CHECKED)
    GUICtrlSetState($halbt, $GUI_UNCHECKED)
    GUICtrlSetState($nichtt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 200)
    IniWrite($ini, "Transparenz", "Transparenz", "200")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $halbt
    GUICtrlSetState($halbt, $GUI_CHECKED)
    GUICtrlSetState($schwacht, $GUI_UNCHECKED)
    GUICtrlSetState($nichtt, $GUI_UNCHECKED)
    WinSetTrans($title, "", 150)
    IniWrite($ini, "Transparenz", "Transparenz", "150")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $aoty
    WinSetOnTop($title, "", 1)
    GUICtrlSetState($aoty, $GUI_CHECKED)
    GUICtrlSetState($aotn, $GUI_UNCHECKED)
    Case $aotn
    WinSetOnTop($title, "", 0)
    GUICtrlSetState($aotn, $GUI_CHECKED)
    GUICtrlSetState($aoty, $GUI_UNCHECKED)
    Case $aktualisieren
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $about
    MsgBox(262208, "Über dieses Programm", "Dieses Programm wurde von xp_fan aus der deutschen AutoIt-Community http://www.autoit.de geschrieben!" & Chr(10) & "Besonderen Dank an tobi_girst, Oscar, Andy und UEZ von Autoit.de für ihre Hilfe!")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $exit
    _Ende()
    EndSwitch
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func U1()
    $h1 = StringLeft(@HOUR, 1)
    Switch $h1
    Case 0
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U1

    [/autoit] [autoit][/autoit] [autoit]

    Func U2()
    $h2 = StringRight(@HOUR, 1)
    Switch $h2
    Case 0
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U2

    [/autoit] [autoit][/autoit] [autoit]

    Func U3()
    $h3 = StringLeft(@MIN, 1)
    Switch $h3
    Case 0
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U3

    [/autoit] [autoit][/autoit] [autoit]

    Func U4()
    $h4 = StringRight(@MIN, 1)
    Switch $h4
    Case 0
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U4

    [/autoit] [autoit][/autoit] [autoit]

    Func U5()
    $h5 = StringLeft(@SEC, 1)
    Switch $h5
    Case 0
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U5

    [/autoit] [autoit][/autoit] [autoit]

    Func U6()
    $h6 = StringRight(@SEC, 1)
    Switch $h6
    Case 0
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U6

    [/autoit] [autoit][/autoit] [autoit]

    Func _Dot()
    _GDIPlus_PenSetColor($hPen1, $colornotactive)
    _GDIPlus_BrushSetSolidColor($hPen2, $coloractive)
    _GDIPlus_BrushSetSolidColor($hPen3, $colornotactive)
    If $counter = 1 Then
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen3)
    $counter = 0
    Else
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 196, 100, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hBackbuffer, 405, 100, 15, 15, $hPen2)
    $counter = 1
    EndIf
    EndFunc ;==>_Dot

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Update()
    Select
    Case @HOUR <> $Hour
    U1()
    U2()
    Case @MIN <> $Minutes
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    Case $Seconds1 <> StringLeft(@SEC, 1)
    U5()
    U6()
    _Dot()
    Case $Seconds2 <> StringRight(@SEC, 1)
    U6()
    _Dot()
    EndSelect
    $Seconds1 = StringLeft(@SEC, 1)
    $Seconds2 = StringRight(@SEC, 1)
    $Minutes = @MIN
    $Hour = @HOUR
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
    EndFunc ;==>_Update

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _7s($x, $y, $delete = 0, $c1 = $colornotactive, $c2 = $colornotactive, $c3 = $colornotactive, $c4 = $colornotactive, $c5 = $colornotactive, $c6 = $colornotactive, $c7 = $colornotactive)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Local $aPoints1[7][2], $aPoints2[7][2], $aPoints3[7][2], $aPoints4[7][2], $aPoints5[7][2], $aPoints6[7][2], $aPoints7[7][2], $hPen[14], $Graphic[14]
    If $delete = 0 Then

    [/autoit] [autoit][/autoit] [autoit]

    $Posx1 = $x
    $Posy1 = $y + 1
    $aPoints1[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[1][0] = $Posx1
    $aPoints1[1][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[2][0] = $Posx1 + 10
    $aPoints1[2][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[6][0] = $Posx1 + 10
    $aPoints1[6][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[3][0] = $Posx1 + 50
    $aPoints1[3][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[5][0] = $Posx1 + 50
    $aPoints1[5][1] = $Posy1 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints1[4][0] = $Posx1 + 60
    $aPoints1[4][1] = $Posy1 - 5

    [/autoit] [autoit][/autoit] [autoit]

    ;~ _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    ;~ $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen[0] = _GDIPlus_PenCreate($c1)
    $hPen[1] = _GDIPlus_BrushCreateSolid($c1)
    $Graphic[0] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints1, $hPen[0])
    $Graphic[1] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints1, $hPen[1])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx2 = $x
    $Posy2 = $y + 63
    $aPoints2[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[1][0] = $Posx2
    $aPoints2[1][1] = $Posy2

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[2][0] = $Posx2 + 10
    $aPoints2[2][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[6][0] = $Posx2 + 10
    $aPoints2[6][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[3][0] = $Posx2 + 50
    $aPoints2[3][1] = $Posy2 - 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[5][0] = $Posx2 + 50
    $aPoints2[5][1] = $Posy2 + 7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints2[4][0] = $Posx2 + 60
    $aPoints2[4][1] = $Posy2
    $hPen[2] = _GDIPlus_PenCreate($c2)
    $hPen[3] = _GDIPlus_BrushCreateSolid($c2)
    $Graphic[2] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints2, $hPen[2])
    $Graphic[3] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints2, $hPen[3])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx3 = $x - 1
    $Posy3 = $y + 125
    $aPoints3[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[1][0] = $Posx3
    $aPoints3[1][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[2][0] = $Posx3 + 10
    $aPoints3[2][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[6][0] = $Posx3 + 10
    $aPoints3[6][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[3][0] = $Posx3 + 50
    $aPoints3[3][1] = $Posy3 - 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[5][0] = $Posx3 + 50
    $aPoints3[5][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints3[4][0] = $Posx3 + 60
    $aPoints3[4][1] = $Posy3 + 5

    [/autoit] [autoit][/autoit] [autoit]

    $hPen[4] = _GDIPlus_PenCreate($c3)
    $hPen[5] = _GDIPlus_BrushCreateSolid($c3)
    $Graphic[4] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints3, $hPen[4])
    $Graphic[5] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints3, $hPen[5])

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;vertikal;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx4 = $x + 3
    $Posy4 = $y
    $aPoints4[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[1][0] = $Posx4 - 5
    $aPoints4[1][1] = $Posy4

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[2][0] = $Posx4 + 5
    $aPoints4[2][1] = $Posy4 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[3][0] = $Posx4 + 5
    $aPoints4[3][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[4][0] = $Posx4 - 5
    $aPoints4[4][1] = $Posy4 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[5][0] = $Posx4 - 5
    $aPoints4[5][1] = $Posy4 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints4[6][0] = $Posx4 - 5
    $aPoints4[6][1] = $Posy4 + 10
    $hPen[6] = _GDIPlus_PenCreate($c4)
    $hPen[7] = _GDIPlus_BrushCreateSolid($c4)
    $Graphic[6] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints4, $hPen[6])
    $Graphic[7] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints4, $hPen[7])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx5 = $x + 3
    $Posy5 = $y + 66
    $aPoints5[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[1][0] = $Posx5 - 5
    $aPoints5[1][1] = $Posy5

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[2][0] = $Posx5 + 5
    $aPoints5[2][1] = $Posy5 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[3][0] = $Posx5 + 5
    $aPoints5[3][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[4][0] = $Posx5 - 5
    $aPoints5[4][1] = $Posy5 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[5][0] = $Posx5 - 5
    $aPoints5[5][1] = $Posy5 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints5[6][0] = $Posx5 - 5
    $aPoints5[6][1] = $Posy5 + 10
    $hPen[8] = _GDIPlus_PenCreate($c5)
    $hPen[9] = _GDIPlus_BrushCreateSolid($c5)
    $Graphic[8] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints5, $hPen[8])
    $Graphic[9] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints5, $hPen[9])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx6 = $x + 56
    $Posy6 = $y
    $aPoints6[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[1][0] = $Posx6 + 5
    $aPoints6[1][1] = $Posy6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[2][0] = $Posx6 + 5
    $aPoints6[2][1] = $Posy6 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[3][0] = $Posx6 + 5
    $aPoints6[3][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[4][0] = $Posx6 + 5
    $aPoints6[4][1] = $Posy6 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[5][0] = $Posx6 - 5
    $aPoints6[5][1] = $Posy6 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints6[6][0] = $Posx6 - 5
    $aPoints6[6][1] = $Posy6 + 10
    $hPen[10] = _GDIPlus_PenCreate($c6)
    $hPen[11] = _GDIPlus_BrushCreateSolid($c6)
    $Graphic[10] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints6, $hPen[10])
    $Graphic[11] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints6, $hPen[11])

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx7 = $x + 56
    $Posy7 = $y + 66
    $aPoints7[0][0] = 6

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[1][0] = $Posx7 + 5
    $aPoints7[1][1] = $Posy7

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[2][0] = $Posx7 + 5
    $aPoints7[2][1] = $Posy7 + 10

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[3][0] = $Posx7 + 5
    $aPoints7[3][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[4][0] = $Posx7 + 5
    $aPoints7[4][1] = $Posy7 + 60

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[5][0] = $Posx7 - 5
    $aPoints7[5][1] = $Posy7 + 50

    [/autoit] [autoit][/autoit] [autoit]

    $aPoints7[6][0] = $Posx7 - 5
    $aPoints7[6][1] = $Posy7 + 10
    $hPen[12] = _GDIPlus_PenCreate($c7)
    $hPen[13] = _GDIPlus_BrushCreateSolid($c7)
    $Graphic[12] = _GDIPlus_GraphicsDrawPolygon($hBackbuffer, $aPoints7, $hPen[12])
    $Graphic[13] = _GDIPlus_GraphicsFillPolygon($hBackbuffer, $aPoints7, $hPen[13])
    Else
    For $i = 0 To 12 Step 2
    _GDIPlus_PenDispose($hPen[$i])
    Next
    For $ii = 1 To 13 Step 2
    _GDIPlus_BrushDispose($hPen[$i])
    Next
    ;~ For $iii = 0 To 13
    ;~ _GDIPlus_GraphicsDispose($hGraphic)
    ;~ Next
    ;~ _GDIPlus_Shutdown()
    EndIf
    EndFunc ;==>_7s

    [/autoit] [autoit][/autoit] [autoit]

    Func _SelectColors($choosecoloractive = 0xFF00FF00, $choosecolornotactive = 0xFF002200)
    $coloractive = $choosecoloractive
    $colornotactive = $choosecolornotactive
    _GDIPlus_PenSetColor($hPen1, $colornotactive)
    _GDIPlus_BrushSetSolidColor($hPen2, $coloractive)
    _GDIPlus_BrushSetSolidColor($hPen3, $colornotactive)
    EndFunc ;==>_SelectColors

    [/autoit] [autoit][/autoit] [autoit]

    Func _Ende()
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_PenDispose($hPen1)
    _GDIPlus_BrushDispose($hPen2)
    _GDIPlus_BrushDispose($hPen3)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Ende

    [/autoit] [autoit][/autoit] [autoit]

    Func _Farbe($active, $notactive); Vielen Dank an Oscar für diese Funktion
    GUIRegisterMsg($WM_TIMER, "")
    _GDIPlus_PenDispose($hPen1)
    _GDIPlus_BrushDispose($hPen2)
    _GDIPlus_BrushDispose($hPen3)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    GUIDelete()
    $param1 = String($active)
    $param2 = String($notactive)
    $s2 = String(@ScriptName)
    If @OSArch = 'X86' Then
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.exe' ; für 32 Bit
    Else
    $autoit = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3_x64.exe' ; für 64 Bit
    EndIf
    Run(Chr(34) & $autoit & Chr(34) & " " & $s2 & " " & $param1 & " " & $param2)
    Exit
    EndFunc ;==>_Farbe

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]