1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. UEZ

Beiträge von UEZ

  • Rekursionseinstieg: Fakultät - Logikproblem!?

    • UEZ
    • 19. Januar 2010 um 19:52

    Anmerkung: Rekusion ist um einiges langsamer als Iteration!

    [autoit]


    $n = 25

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

    $bench_start = TimerInit()
    ConsoleWrite(Fibonacci_i($n) & @CRLF)
    $bench_end_i = Round(TimerDiff($bench_start), 4)

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

    $bench_start = TimerInit()
    ConsoleWrite(Fibonacci_r($n) & @CRLF)
    $bench_end_r = Round(TimerDiff($bench_start), 4)

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

    ConsoleWrite(@CRLF & "Iterative: " & $bench_end_i & " ms" & @CRLF & "Recursive: " & $bench_end_r & " ms" & @CRLF & "Diff: " & Abs($bench_end_i - $bench_end_r) & " ms !" & @CRLF & @CRLF)

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

    Func Fibonacci_i($f)
    Dim $arr_fib[3]
    $arr_fib[0] = 0
    $arr_fib[1] = 1
    For $i = 2 To $f
    $arr_fib[2] = $arr_fib[1] + $arr_fib[0]
    $arr_fib[0] = $arr_fib[1]
    $arr_fib[1] = $arr_fib[2]
    Next
    Return $arr_fib[2]
    EndFunc

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

    Func Fibonacci_r($f)
    If $f = 0 Then Return 0
    If $f = 1 Then Return 1
    Return Fibonacci_r($f - 1) + Fibonacci_r($f - 2)
    EndFunc

    [/autoit]

    Woran das hängt kann ich nicht sagen! Habe mal dazu ein Thread im engl. Forum erstellt, aber die Dev. haben nichts konkretes sagen können! Für Rekursion ist AutoIt wohl eher nicht geeignet!

    Also nach Möglichkeit Rekursion vermeiden!

    Ob das auch so in anderen Sprachen, wie z.B. C/C++ ist?

    Gruß,
    UEZ

  • SIDPlay DLL

    • UEZ
    • 17. Januar 2010 um 21:56
    Zitat von leviathan

    Da das Projekt in C++ geschrieben ist, brauchst du einen c++ Compiler.
    Alternativ könntest du auch fmod.dll benutzen mitm sid plugin.

    Ich habe den MS Visual Studio C++ installiert. Mal sehen, ob ich damit was anfangen kann!

    Zu FMOD + Plugins: ich habe zwar jetzt das SID Plugin, aber ich weiß nicht, wie ich damit SIDs abspielen kann!

    Im Anhang sind die nötigen Dateien. FMod_Player.au3 spielt die Sounds im Mods Verzeichnis, außer Delta_(subtune 1).sid (zufällige SID), ab!

    Weiß jemand, wie ich die Plugins benutzen kann?

    DANKE,
    UEZ

    Dateien

    FMOD SID Player.7z 2,46 MB – 381 Downloads
  • SIDPlay DLL

    • UEZ
    • 17. Januar 2010 um 15:52

    Hi,

    ich würde gerne SID Dateien (sind C64 Chip Tunes) mit Hilfe von AutoIt abspielen, wie z.B. Bass.dll mp3, ogg, etc. abspielen kann, leider eben keine SID Dateien!

    Ich habe SidPlayDll gefunden, das in C oder C++ geschrieben ist! Leider bin ich noch nicht so weit, um den Code zu verstehen, geschweige denn den Code zu kompilieren!

    Nun meine 2 Fragen:

    • Wie kann ich den Source Code kompilieren? Was benötige ich dazu? Anleitung?
    • Wie kann ich die kompilierte DLL (ich hoffe, dass der Code eine DLL erstellt) dazu benutzen, um SID Dateien mit AutoIt abzuspielen?

    DANKE,
    UEZ

    Dateien

    SidPlayDll.zip 117,76 kB – 423 Downloads resid-0.16.7z 180,57 kB – 443 Downloads HSIDDLL-208.zip 53,91 kB – 368 Downloads libsidplay2.DLL.7z 57,02 kB – 365 Downloads
  • ConsoleWrite an vorkompilierte Console

    • UEZ
    • 17. Januar 2010 um 12:02

    Ich denke, du suchst so was: http://www.autoitscript.com/forum/index.php?showtopic=104117

    Gruß,
    UEZ

  • RibbonsBar (Office 2007 Bar) UDF

    • UEZ
    • 16. Januar 2010 um 22:50

    chrisatack: kannst du dein Projekt auch im englischen Forum veröffentlichen? Ich war so frei und habe dein Projekt im englischen Forum erwähnt und nun ist die Anfrage da!
    Musst eben entsprechend übersetzen!

    Gruß,
    UEZ

  • C++ DLL

    • UEZ
    • 16. Januar 2010 um 22:41
    Zitat von nof@ker2

    Da eine von mir geschriebene Funktion in AutoIt zu langsam ist ...

    Und wie sieht es damit aus?:

    [autoit]


    Func _RectCollision($Rect1X1,$Rect1Y1,$Rect1X2,$Rect1Y2, $Rect2X1, $Rect2Y1, $Rect2X2, $Rect2Y2)
    ; Prog@ndy
    Local Const $tagRECT = "long;long;long;long"
    Local $1 = DllStructCreate($tagRECT)
    Local $2 = DllStructCreate($tagRECT)
    Local $3 = DllStructCreate($tagRECT)
    DllStructSetData($1,1,$Rect1X1)
    DllStructSetData($1,2,$Rect1Y1)
    DllStructSetData($1,3,$Rect1X2)
    DllStructSetData($1,4,$Rect1Y2)
    DllStructSetData($2,1,$Rect2X1)
    DllStructSetData($2,2,$Rect2Y1)
    DllStructSetData($2,3,$Rect2X2)
    DllStructSetData($2,4,$Rect2Y2)
    Local $r = DllCall("User32.dll", "int", "IntersectRect", "ptr", DllStructGetPtr($3), "ptr", DllStructGetPtr($1), "ptr", DllStructGetPtr($2))
    If @error Then Return SetError(1,0,0)
    Return $r[0]<>0
    EndFunc

    [/autoit]

    Gruß,
    UEZ

  • AutoIt-Skript in einem "schwarzem Fenster"

    • UEZ
    • 15. Januar 2010 um 15:41
    [autoit]


    #AutoIt3Wrapper_Change2CUI=y

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

    If $CmdLine[0] > 0 Then
    ConsoleWrite($CmdLine[1] & @CRLF)
    Else
    ConsoleWrite("Hello CMD world!" & @CRLF)
    EndIf

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

    While 1 * Sleep(100)
    WEnd

    [/autoit]

    Compilieren und die Exe dann starten!


    Ich hoffe, dass du das meinst!

    Gruß,
    UEZ

    PS: Ups, gab ja gleich mehrer Antworten... :whistling:

  • Integer <=> Binary Converter v1.0 Build 2011-09-19

    • UEZ
    • 14. Januar 2010 um 14:32
    Zitat von Oscar

    Ja, so meinte ich das. :thumbup:

    Ich hätte noch eine Idee für den Ausbau des Programms:
    Die Darstellung gruppiert ja jetzt nach Halbbytes (Nibbles). Diese werden in der Elektronik für die Ansteuerung von LED-(7-Segment-)Anzeigen verwendet.
    Wenn Du jetzt noch eine Anzeige/Umrechnung der Nibbles nach 7-Segment einbauen würdest, dann hätte man ein Programm, mit dem man die Byteausgabe mit der Anzeige vergleichen kann.
    Ganz praktisch für die Fehlerdiagnose.

    Falls Du das Programm noch erweitern möchtest...

    Interessant wäre es schon, aber das würde über das Ziel hinausschießen! Würde nur Sinn machen, wenn die Möglichen 15 Zahlen auch als LED angezeigt werden könnten und dafür habe ich das kleine Tool nicht entworfen!

    Aber wer weiß....


    Gruß,
    UEZ

  • Integer <=> Binary Converter v1.0 Build 2011-09-19

    • UEZ
    • 13. Januar 2010 um 13:11
    Zitat von Oscar

    Schönes Script! :thumbup:
    Aber vielleicht solltest Du das noch erweitern und die Binärwerte gruppieren (nach: Byte, Word, Long).

    Beispiel: 7568 = 1 1101 1001 0000


    Danke für dein Feedback. Ich habe den Code aktualisiert! Meinst du das so mit der Gruppierung?

    Gruß,
    UEZ

  • Integer <=> Binary Converter v1.0 Build 2011-09-19

    • UEZ
    • 12. Januar 2010 um 12:33

    Ein kleines Tool zum Umwandlen zwischen Integer- und Binärzahlen:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2010
    #AutoIt3Wrapper_UseX64=n
    #AutoIt3Wrapper_Change2CUI=n
    #AutoIt3Wrapper_Res_Description=Converter between integer <=> binary
    #AutoIt3Wrapper_Res_Fileversion=1.0
    #AutoIt3Wrapper_Res_Language=1033
    #AutoIt3Wrapper_Res_LegalCopyright=UEZ 2010
    #AutoIt3Wrapper_Res_Field=Coded by|UEZ
    #AutoIt3Wrapper_Res_Field=Build|2011-09-19
    #AutoIt3Wrapper_Res_Field=Compile date|%longdate% %time%
    #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_Res_SaveSource=n
    #AutoIt3Wrapper_UseUpx=y
    #AutoIt3Wrapper_UPX_Parameters=--best --lzma
    #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
    ;~ #AutoIt3Wrapper_Run_After=Upack.exe "%out%" -c6 -f273 -red

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

    #include <ButtonConstants.au3>
    #include <Constants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <String.au3>
    #include <StaticConstants.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    #Region
    $title = "Integer <=> Binary Converter by UEZ "
    $ver = " v1.0 Build 2011-09-19"
    $hWnd = GUICreate($title & $ver, 625, 336)

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

    $MenuItem1 = GUICtrlCreateMenu("Help")
    $MenuItem2 = GUICtrlCreateMenuItem("About", $MenuItem1)
    $MenuItem4 = GUICtrlCreateMenuItem("Exit", $MenuItem1)

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

    $Input = GUICtrlCreateInput("", 104, 144, 203, 30)
    GUICtrlSetTip($Input , "Enter here an integer number up to 15 digits to convert it to binary on-the-fly!")
    $fsize = 16
    GUICtrlSetFont(-1, $fsize, 400, 0, "Times New Roman")
    GUICtrlSetLimit($Input, 15)

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

    #Region Caret (Cursor) ;thanks to Yashied
    $hInput1 = GUICtrlGetHandle($Input)
    $cursor_size_x = $fsize
    $cursor_size_y = 23

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

    $tIcon = DllStructCreate("hwnd")
    $tID = DllStructCreate("hwnd")
    $sIcon = @SystemDir & "\shell32.dll"
    ;~ $max_icons = _WinAPI_ExtractIconEx($sIcon, -1, 0, 0, 0)
    $iBackground = 0xFFFFFF
    $iIndex = 130 ;should be the butterfly icon
    ;~ $iIndex = Random(0, $max_icons, 1)
    DllCall("user32.dll", "int", "PrivateExtractIcons", "str", $sIcon, "int", $iIndex, "int", $cursor_size_x, "int", $cursor_size_y, "ptr", DllStructGetPtr($tIcon), "ptr", DllStructGetPtr($tID), "int", 1, "int", 0)
    $hIcon = DllStructGetData($tIcon, 1)
    $hDC = _WinAPI_GetDC(0)
    $hBackDC = _WinAPI_CreateCompatibleDC($hDC)
    $hBitmap = _WinAPI_CreateSolidBitmap($hWnd, 0xFFFFFF - $iBackground, $cursor_size_x, $cursor_size_y)
    $hBackSv = _WinAPI_SelectObject($hBackDC, $hBitmap)
    $hFrontDC = _WinAPI_CreateCompatibleDC($hDC)
    $hInv = _WinAPI_CreateSolidBitmap($hWnd, $iBackground, $cursor_size_x, $cursor_size_y)
    $hFrontSv = _WinAPI_SelectObject($hFrontDC, $hInv)

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

    _WinAPI_DrawIconEx($hFrontDC, 0, 0, $hIcon, 0, 0, 0, 0, $DI_NORMAL)
    _WinAPI_BitBlt($hBackDC, 0, 0, $cursor_size_x, $cursor_size_y, $hFrontDC, 0, 0, $NOTSRCCOPY) ;invert icon color
    _WinAPI_SelectObject($hFrontDC, $hFrontSv)
    _WinAPI_SelectObject($hBackDC, $hBackSv)
    _WinAPI_ReleaseDC($hWnd, $hDC)
    _WinAPI_DeleteDC($hFrontDC)
    _WinAPI_DeleteDC($hBackDC)
    _WinAPI_DeleteObject($hIcon)
    _WinAPI_DeleteObject($hInv)

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

    $pHook = DllCallbackRegister("_WM_CARET", "ptr", "hwnd;uint;long;ptr")
    $hProc = _WinAPI_SetWindowLong($hInput1, $GWL_WNDPROC, DllCallbackGetPtr($pHook))
    $BlinkTime_save = DllCall('user32.dll', 'int', 'GetCaretBlinkTime')
    $BlinkTime = Int($BlinkTime_save[0] / 2) ;-1 -> no blinking cursor
    #EndRegion

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

    $Edit = GUICtrlCreateEdit("", 104, 200, 345, 89, $ES_NOHIDESEL + $ES_LEFT)
    GUICtrlSetLimit($Edit, 64)
    GUICtrlSetTip($Edit , "Enter here a binary number up to 52 digits to convert it to integer on-the-fly!")
    GUICtrlSetFont($Edit, 56, 400, 0, "Arial")

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

    $LabelS = GUICtrlCreateLabel("Integer <=> Binary Converter", 19, 34, 595, 65)
    GUICtrlSetColor(-1, 0x202060) ;RGB
    GUICtrlSetFont(-1, 36, 800, 2, "Times New Roman", 4)
    $Label1 = GUICtrlCreateLabel("Integer <=> Binary Converter", 16, 35, 595, 65)
    GUICtrlSetBkColor(-1, -2)
    GUICtrlSetFont($Label1, 36, 800, 2, "Times New Roman", 4)
    GUICtrlSetColor(-1, 0x5080F0)

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

    $Group1 = GUICtrlCreateGroup("", 8, 16, 609, 89)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Group2 = GUICtrlCreateGroup("UEZ 2010", 8, 120, 609, 185, $BS_RIGHT)
    GUICtrlSetFont(-1, 6, 400, 0, "Times New Roman")
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Label2 = GUICtrlCreateLabel("Integer:", 54, 146, 44, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")

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

    $Label3 = GUICtrlCreateLabel("Binary:", 56, 204, 44, 30)
    GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")

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

    $Label4 = GUICtrlCreateLabel("Hex: 0", 460, 204, 150, 30)
    GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
    GUICtrlSetTip($Label4, "To hex number conversation")

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

    $Label5 = GUICtrlCreateLabel("Oct: 0", 460, 224, 150, 40)
    GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
    GUICtrlSetTip($Label5, "To octal number conversation")

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

    $Button1 = GUICtrlCreateButton("Exit", 536, 264, 75, 25)
    $Button2 = GUICtrlCreateButton("Clipboard", 456, 264, 75, 25)
    GUICtrlSetTip($Button2 , "Press Clipboard to get binary number copied to clipboard")
    $Button3 = GUICtrlCreateButton("Clipboard", 314, 146, 75, 25)
    GUICtrlSetTip($Button3 , "Press Clipboard to get integer number copied to clipboard")

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

    GUISetState(@SW_SHOW)
    GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND')
    #EndRegion

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $Button1, $MenuItem4
    DllCall('user32.dll', 'int', 'SetCaretBlinkTime', 'uint', $BlinkTime_save[0])
    _WinAPI_SetWindowLong($hInput1, $GWL_WNDPROC, $hProc)
    DllCallbackFree($pHook)
    GUIRegisterMsg($WM_COMMAND, "")
    GUIDelete($hWnd)
    Exit
    Case $Button2
    ClipPut(StringRegExpReplace(GUICtrlRead($Edit), "[' ']", ""))
    MsgBox(64, "Clipboard", "Binary number copied to clipboard", 10)
    Case $Button3
    ClipPut(GUICtrlRead($Input))
    MsgBox(64, "Clipboard", "Integer number copied to clipboard", 10)
    Case $MenuItem2
    MsgBox(0, $title, $title & $ver & @CRLF & @CRLF & "Thanks to Yashied for the caret code ;-)"& @CRLF & @CRLF & @CRLF & "Br," & @CRLF & "UEZ", 30)
    EndSwitch
    WEnd

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

    Func Integer2Binary($in)
    If $in = 0 Then Return 0
    Local $bin
    While $in > 0
    $bin &= Mod($in, 2)
    $in = Floor($in / 2)
    ;~ $in = BitShift($in, 1)
    WEnd
    Return(_StringReverse($bin))
    EndFunc

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

    Func Binary2Integer($in)
    Local $int, $x, $i = 1, $aTmp = StringSplit(_StringReverse($in), "")
    For $x = 1 To UBound($aTmp) - 1
    $int += $aTmp[$x] * $i
    $i *= 2
    Next
    $aTmp = 0
    Return StringFormat('%.0f', $int)
    EndFunc

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

    Func Integer2Hex($in)
    Local $aHex[16] = [0, 1, 2, 3, 4, 5 ,6 ,7 ,8, 9, "A", "B", "C", "D", "E", "F"]
    Local $hex
    While 1
    $hex &= $aHex[Mod($in, 0x10)]
    $in = Floor($in / 0x10)
    If Not $in Then ExitLoop
    WEnd
    Return _StringReverse($hex)
    EndFunc

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

    Func Integer2Octal($in)
    Local $oct, $t, $r
    While 1
    $oct &= Mod($in, 0x8)
    $in = Floor($in / 0x8)
    If Not $in Then ExitLoop
    WEnd
    Return _StringReverse($oct)
    EndFunc

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

    Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
    Local $inp, $integer, $chk, $b, $c, $sLen, $int2

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

    $chk = BitAND($wParam, 0x0000FFFF)
    Switch $chk
    Case $Input
    $inp = GUICtrlRead($Input)
    $integer = StringRegExpReplace($inp, "[^0-9]", "")
    GUICtrlSetData($Label4, "Hex: " & Integer2Hex($integer))
    GUICtrlSetData($Label5, "Oct: " & Integer2Octal($integer))
    GUICtrlSetData($Input, $integer)
    $b = Integer2Binary(Number($integer))
    $c = _StringReverse(StringRegExpReplace(_StringReverse($b), ".{1,4}", " $0"))
    GUICtrlSetData($Edit, StringLeft($c, StringLen($c) - 1))
    $sLen = StringLen(GUICtrlRead($Edit))
    Switch $sLen
    Case 0 To 4
    GUICtrlSetFont($Edit, 56, 400, 0, "Arial", 4)
    Case 5 To 8
    GUICtrlSetFont($Edit, 48, 400, 0, "Arial", 4)
    Case 9 To 12
    GUICtrlSetFont($Edit, 32, 400, 0, "Arial", 4)
    Case 13 To 16
    GUICtrlSetFont($Edit, 28, 400, 0, "Arial", 4)
    Case 17 To 32
    GUICtrlSetFont($Edit, 24, 400, 0, "Arial", 4)
    Case 33 To 50
    GUICtrlSetFont($Edit, 18, 400, 0, "Arial", 4)
    EndSwitch
    Case $Edit
    $inp = GUICtrlRead($Edit)
    $b = StringRegExpReplace($inp, "[^0-1]", "")
    $c = _StringReverse(StringRegExpReplace(_StringReverse($b), ".{1,4}", " $0"))
    GUICtrlSetData($Edit, StringLeft($c, StringLen($c) - 1))
    $int2 = Binary2Integer(String($b))
    GUICtrlSetData($Input, $int2)
    GUICtrlSetData($Label4, "Hex: " & Integer2Hex($int2))
    GUICtrlSetData($Label5, "Oct: " & Integer2Octal($int2))
    $sLen = StringLen(GUICtrlRead($Edit))
    Switch $sLen
    Case 0 To 6
    GUICtrlSetFont($Edit, 56, 400, 0, "Arial", 4)
    Case 7 To 12
    GUICtrlSetFont($Edit, 32, 400, 0, "Arial", 4)
    Case 13 To 31
    GUICtrlSetFont($Edit, 24, 400, 0, "Arial", 4)
    Case 32 To 50
    GUICtrlSetFont($Edit, 18, 400, 0, "Arial", 4)
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc

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

    Func _WM_CARET($hWnd, $uiMsg, $wParam, $lParam)
    Local $Res = _WinAPI_CallWindowProc($hProc, $hWnd, $uiMsg, $wParam, $lParam)

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

    Switch $uiMsg
    Case $WM_SETFOCUS
    DllCall('user32.dll', 'int', 'CreateCaret', 'hwnd', $hWnd, 'ptr', $hBitmap, 'int', 0, 'int', 0)
    DllCall('user32.dll', 'int', 'ShowCaret', 'hwnd', $hWnd)
    DllCall('user32.dll', 'int', 'SetCaretBlinkTime', 'uint', $BlinkTime)
    Case $WM_KILLFOCUS
    DllCall('user32.dll', 'int', 'HideCaret', 'hwnd', $hWnd)
    DllCall('user32.dll', 'int', 'DestroyCaret')
    DllCall('user32.dll', 'int', 'SetCaretBlinkTime', 'uint', $BlinkTime_save[0])
    EndSwitch

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

    Return $Res
    EndFunc ;==>_WM_CARET

    [/autoit]

    Vielleicht kann das ja mal jemand gebrauchen...


    Gruß,
    UEZ

    2010-09-29: kleines Update -> die Integer Zahl wird jetzt auch nach Hex und Oktal umgewandelt und angezeigt
    2010-11-29: hatte vergessen, dass auch bei der Binäreingabe in Oktal umgerechnet wird -> sollte jetzt funzen
    2011-09-19: kleinere Modifikationen

    Dateien

    Integer-Binary Converter.au3 9,5 kB – 574 Downloads
  • GDI - Png drehen und auf Hintergrund zeichen

    • UEZ
    • 10. Januar 2010 um 22:56

    Hier mein Lösungsvorschlag:

    Spoiler anzeigen
    [autoit]


    ;Coded by UEZ 2010-01-10
    #include <GDIplus.au3>
    Opt("GUIOnEventMode", 1)

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

    _GDIPlus_Startup()
    Global $load_background = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\Background.png")
    Global $load_foreground = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\Smiley.png")
    Global $width = _GDIPlus_ImageGetWidth($load_background)
    Global $height = _GDIPlus_ImageGetHeight($load_background)

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

    Global $dx = _GDIPlus_ImageGetWidth($load_foreground)
    Global $dy = _GDIPlus_ImageGetHeight($load_foreground)

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

    Global $i

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

    Global $hWnd = GUICreate("GDI+: Example by UEZ", $width, $height, -1, -1, Default)
    GUISetOnEvent(-3, "_Exit")
    GUISetState()

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

    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphics)
    Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)

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

    Global $hFGBitmap = _GDIPlus_BitmapCreateFromGraphics($dx, $dy, $hGraphics)
    Global $hFGBackbuffer = _GDIPlus_ImageGetGraphicsContext($hFGBitmap)

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

    Global $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, $dx / 2, $dy / 2)

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

    Global $FG_x = 0
    Global $FG_y = $height / 2 - $dy / 2

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

    Global $coordinate[1][2]
    $coordinate[0][0] = 0
    $coordinate[0][1] = 0
    $i = 6
    $j = 3
    While Sleep(30)
    _GDIPlus_GraphicsDrawImage($hBackbuffer, $load_background, 0, 0) ;draw background
    _GDIPlus_GraphicsClear($hFGBackbuffer, 0x00000000) ;clear backbuffer from foreground graphics

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

    _GDIPlus_MatrixRotate($hMatrix, $i, "False") ;rotate foreground graphic
    _GDIPlus_GraphicsSetTransform($hFGBackbuffer, $hMatrix)
    _GDIPlus_GraphicsDrawImage($hFGBackbuffer, $load_foreground, -$dx /2, -$dy / 2)

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

    _GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hFGBitmap, $FG_x, $FG_y, $dx, $dy) ;copy foreground backbuffer to main backbuffer
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, $width, $height) ;copy full drawn image to main screen
    If $FG_x > $width - $dx Or $FG_x < 0 Then
    $i *= -1
    $j *= -1
    EndIf
    $FG_x += $j
    WEnd

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

    Func _Exit()
    _GDIPlus_BitmapDispose($hFGBitmap)
    _GDIPlus_GraphicsDispose($hFGBackbuffer)
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

    [/autoit]

    Im Anhang sind noch die Grafiken!

    Gruß,
    UEZ

    Dateien

    GDI+ Beispiel.7z 451,17 kB – 720 Downloads
  • Physik Engine Projekt

    • UEZ
    • 10. Januar 2010 um 13:20
    Zitat von Faweyr

    Naja, ich weiß ja nicht, ist das aber in Autoit schon möglich?
    Jedoch, tolle Idee :)

    Warum soll das nicht möglich sein? Die Grafiken darstellen ist nicht das Problem, sondern die Mathematik / Physik, die dahinter steckt!

    Es ist absolut nicht trivial die Kollision und die daraus resultierende Bewegungen zu berechnen!

    Die einfachsten Objekte sind Kugeln, alles andere wird komplizierter!

    Gruß,
    UEZ

  • Nach jeden 4. Zeichen ein "-" setzen

    • UEZ
    • 9. Januar 2010 um 14:03
    Zitat von progandy

    Ich hätte noch eine Alternative für die Kontrolle ;)

    Sehr interessanter Ansatz! Wie nuts schon erwähnte, werden Zeichen der Eingabe vor den Cursor verschoben, wenn man "schnell" eingibt!

    Vielleicht kann man da noch ein bisschen tunen!

    Gruß,
    UEZ

  • Nach jeden 4. Zeichen ein "-" setzen

    • UEZ
    • 9. Januar 2010 um 11:42
    Zitat von nuts

    Hab das jetzt mal mit 4 Controls und WM_Command umgesetzt.

    2 Sachen sind mir aufgefallen:

    • Wie kann ich in das Feld zurück, damit ich die Eingabe ändern kann?
    • Nach der Eingabe des letzten Zeichens wird die Seriennummer automatisch in die Liste eingefügt. Was ist, wenn das letzte Zeichen falsch ist?

    Gruß,
    UEZ

  • Nach jeden 4. Zeichen ein "-" setzen

    • UEZ
    • 9. Januar 2010 um 11:37
    Zitat von m-obi

    UEZ: Deins funzt auch noch nicht so einwandfrei, wenn du schreibst kannst du zwar mit der Backspace die Zeichen löschen und neu schreiben. Aber sagen wir mal du hast alles geschrieben und dir fällt auf im 3. Block ist das 2. Zeichen falsch, also gehst du mit dem Cursor dahin und löscht es, wenn du dann deinen Cursor gesetzt hast und Backspace klickst, löscht er das Zeichen und springt ans Ende der ganzen Nummer und wenn du dann das richtige Zeichen eingibst schreibt er es ans Ende, dann besteht der 3. Block aus 3 Zeichen und der 4. aus 5 Zeichen.

    Genau das ist doch das Fiese dran! Deshalb habe ich doch in Post 25 die Cursor Tasten abgefragt, so dass der Cursor nich mehr per Cursor Tasten nach links bewegt werden kann!

    D.h. mit Backspace geht nur noch das Löschen und somit muss man alles löschen, wenn man am Anfang einen Fehler gemacht hat!

    Gruß,
    UEZ

  • Physik Engine Projekt

    • UEZ
    • 7. Januar 2010 um 15:03

    Sieht jetzt schon sehr gut aus! Toll! :thumbup:

    Zeitlich werde ich leider nicht machen können :( würde aber gerne! Müsste nur noch mein Mathe/Physik auffrischen...


    Gruß,
    UEZ

  • GDIPlus Digitaluhr

    • UEZ
    • 6. Januar 2010 um 21:31

    Hier die korrigierte Version:

    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", "0xFF008800"), IniRead(@ScriptDir & "\GDIPlusDigitaluhr.ini", "Farbe", "Hintergrund", "0xFF001100"))
    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, "", 255)

    [/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]

    Global $ScreenDc = _WinAPI_GetDC($hWnd)
    Global $dc = _WinAPI_CreateCompatibleDC($ScreenDc)
    Global $tSize = DllStructCreate($tagSIZE)
    Global $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $width)
    DllStructSetData($tSize, "Y", $height)
    Global $tSource = DllStructCreate($tagPOINT)
    Global $pSource = DllStructGetPtr($tSource)
    Global $tBlend = DllStructCreate($tagBLENDFUNCTION)
    Global $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $st)
    DllStructSetData($tBlend, "Format", 0)
    Global $tPoint = DllStructCreate($tagPOINT)
    Global $pPoint = DllStructGetPtr($tPoint)
    DllStructSetData($tPoint, "X", 0)
    DllStructSetData($tPoint, "Y", 0)
    Global $iFlag = $ULW_ALPHA, $gdibitmap

    [/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)
    $ganzt = GUICtrlCreateMenuItem("Ganz 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)
    Case 0
    GUICtrlSetState($ganzt, $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)
    GUICtrlSetState($ganzt, $GUI_UNCHECKED)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 0)
    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)
    GUICtrlSetState($ganzt, $GUI_UNCHECKED)
    DllStructSetData($tBlend, "Alpha", 200)
    DllStructSetData($tBlend, "Format", 0)
    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)
    GUICtrlSetState($ganzt, $GUI_UNCHECKED)
    DllStructSetData($tBlend, "Alpha", 150)
    DllStructSetData($tBlend, "Format", 0)
    IniWrite($ini, "Transparenz", "Transparenz", "150")
    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()
    Case $ganzt
    GUICtrlSetState($halbt, $GUI_UNCHECKED)
    GUICtrlSetState($schwacht, $GUI_UNCHECKED)
    GUICtrlSetState($nichtt, $GUI_UNCHECKED)
    GUICtrlSetState($ganzt, $GUI_CHECKED)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)
    ;~ 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
    $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_SelectObject($dc, $gdibitmap)
    _WinAPI_UpdateLayeredWindow($hWnd, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, $iFlag)
    _WinAPI_DeleteObject($gdibitmap)
    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
    $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_SelectObject($dc, $gdibitmap)
    _WinAPI_UpdateLayeredWindow($hWnd, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, $iFlag)
    _WinAPI_DeleteObject($gdibitmap)
    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, "")
    _WinAPI_DeleteDC($dc)
    _WinAPI_ReleaseDC($hWnd, $ScreenDc)
    _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, "")
    _WinAPI_DeleteDC($dc)
    _WinAPI_ReleaseDC($hWnd, $ScreenDc)
    _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]

    Gruß,
    UEZ

  • GDIPlus Digitaluhr

    • UEZ
    • 6. Januar 2010 um 21:24
    Zitat von Andy

    Hi,
    wenn ich im Kontextmenü Transparenz ausgewähle, erscheint nur der Hintergrund als Fläche, ohne die Ziffern! WIN XP
    Auch das updaten ändert nichts, beim Ändern einer anderen Farbe wird die gewählte Transparenz nicht wiederhergestellt, sondern 100% transparent ist default

    Richtig, 100% transparent ist eingestellt. Muss mal checken, wie ich das ändern kann (semi transparent)!

    Gruß,
    UEZ

  • GDIPlus Digitaluhr

    • UEZ
    • 6. Januar 2010 um 20:52

    Hier die transparente Version:

    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 + $WS_EX_TOPMOST)
    ;~ GUISetBkColor(0x000000)
    #AutoIt3Wrapper_Add_Constants
    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]

    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]

    $ScreenDc = _WinAPI_GetDC($hWnd)
    $dc = _WinAPI_CreateCompatibleDC($ScreenDc)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $width)
    DllStructSetData($tSize, "Y", $height)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)
    $tPoint = DllStructCreate($tagPOINT)
    $pPoint = DllStructGetPtr($tPoint)
    DllStructSetData($tPoint, "X", 0)
    DllStructSetData($tPoint, "Y", 0)

    [/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
    $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_SelectObject($dc, $gdibitmap)
    _WinAPI_UpdateLayeredWindow($hWnd, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2)
    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
    $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_SelectObject($dc, $gdibitmap)
    _WinAPI_UpdateLayeredWindow($hWnd, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2)
    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, "")
    _WinAPI_DeleteDC($dc)
    _WinAPI_ReleaseDC($hWnd, $ScreenDc)
    _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, "")
    _WinAPI_DeleteDC($dc)
    _WinAPI_ReleaseDC($hWnd, $ScreenDc)
    _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]

    Du solltest die Farben viel dunkler wählen und der Kontrast zwischen Hintergrund- und Vordergrundfarbe sollte höher sein!
    Gruß,
    UEZ

    Dateien

    GDIPlusDigitalUhr.au3 36,09 kB – 277 Downloads
  • Array einlesen + bearbeiten

    • UEZ
    • 6. Januar 2010 um 13:57
    Zitat von Oscar

    Noch kürzer:

    [autoit]


    $s = "Chr(54) & Chr(55) & Chr(53)"
    MsgBox(0, '', StringRegExpReplace($s, 'Chr\((\d.)\)( \& )*', '$1, '))

    [/autoit]

    Ist zwar am kürzesten, aber erzeugt am Ende noch ein Komma!

    Wenn die Kommas egal sind, dann ist MsgBox(0, "", StringRegExpReplace($s, '\D+', '$1, ')) noch kürzer!

    Gruß,
    UEZ

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™