Led Uhr

  • Ja war lange nimmer da bin aber zurück.
    Ich hab da auch mal ein kleines Programm geschireben das 100% portabel ist und auch ein bissel nach was aussieht ..
    Eine Led Uhr ich hoffe es gefällt euch
    Außerdem hoffe ich auf kitick,lob und verbesserungsvorschläge

    Im anhang ist eine rar die die finale protabel version enthält und einmal noch ein ordner in dem das script ist.
    Fileinstall muss auf euch angepasst werden was die pfade betrift.

    MFG Matthias

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=Data\Icon.ico
    #AutoIt3Wrapper_Outfile=LED Uhr.exe
    #AutoIt3Wrapper_Compression=4
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <GuiEdit.au3>
    #include <GuiStatusBar.au3>
    #include <GUIConstants.au3>
    #include <GuiStatusBar.au3>
    #include <GUIConstantsEx.au3>
    #include <windowsconstants.au3>
    #include <StaticConstants.au3>
    #include <GUIConstants.au3>

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

    AutoItSetOption("TrayIconHide", 1)

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

    Global $Old_Zeit, $Zeit, $n = 0, $m = 5, $Prozent, $Prozent_Round
    Dim $Fe[13]
    Dim $Fc[13]

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

    $Fe[0] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\0.jpg", @TempDir & "\", 1)
    $Fe[1] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\1.jpg", @TempDir & "\", 1)
    $Fe[2] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\2.jpg", @TempDir & "\", 1)
    $Fe[3] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\3.jpg", @TempDir & "\", 1)
    $Fe[4] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\4.jpg", @TempDir & "\", 1)
    $Fe[5] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\5.jpg", @TempDir & "\", 1)
    $Fe[6] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\6.jpg", @TempDir & "\", 1)
    $Fe[7] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\7.jpg", @TempDir & "\", 1)
    $Fe[8] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\8.jpg", @TempDir & "\", 1)
    $Fe[9] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\9.jpg", @TempDir & "\", 1)
    $Fe[10] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\10.jpg", @TempDir & "\", 1)
    $Fe[11] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\11.jpg", @TempDir & "\", 1)
    $Fe[12] = FileInstall("C:\Users\Matthias\Desktop\LED uhr\Data\Bilder\12.jpg", @TempDir & "\", 1)

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

    ProgressOn("Led Uhr Start", "Überprüfe Programmdaten", "0 Prozent Abgeschlossen")
    While 1
    $Fc[$n] = FileExists(@TempDir & "\" & $n & ".jpg")
    If $Fc[$n] = 0 Then ExitLoop
    $Prozent = ($n / 12) * 100
    $Prozent_Round = Round($Prozent)
    ProgressSet($Prozent, $Prozent_Round & " Prozent Abgeschlossen", "Überprüfe Programmdaten")
    If $n = 12 Then ExitLoop
    $n = $n + 1
    Sleep(250)
    WEnd

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

    If $Fc[$n] = 0 Then
    ProgressOff()
    MsgBox(16, "Led Uhr Fehler", "File nicht gefunden, File ID " & $n)
    Exit
    EndIf
    Sleep(1000)
    While 1
    ProgressSet($Prozent, "Alle Daten vorhanden starte Programm in " & $m, "Programmdaten wurden überprüft")
    Sleep(999)
    $m = $m - 1
    If $m <= 0 Then ExitLoop
    WEnd
    ProgressOff()
    Sleep(500)

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Led Uhr", 435, 110)
    GUISetBkColor(0x000000)
    GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
    GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
    GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
    GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
    $Pic1 = GUICtrlCreatePic(@TempDir & "\0.jpg", 8, 8, 60, 100)
    $Pic2 = GUICtrlCreatePic(@TempDir & "\0.jpg", 72, 8, 60, 100)
    $Pic3 = GUICtrlCreatePic(@TempDir & "\0.jpg", 152, 8, 60, 100)
    $Pic4 = GUICtrlCreatePic(@TempDir & "\0.jpg", 216, 8, 60, 100)
    $Pic5 = GUICtrlCreatePic(@TempDir & "\0.jpg", 296, 8, 60, 100)
    $Pic6 = GUICtrlCreatePic(@TempDir & "\0.jpg", 360, 8, 60, 100)
    $Pic7 = GUICtrlCreatePic(@TempDir & "\11.jpg", 136, 8, 12, 100)
    $Pic8 = GUICtrlCreatePic(@TempDir & "\11.jpg", 280, 8, 12, 100)
    GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Aktual_Uhr()
    Sleep(100)
    WEnd

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

    Func Form1Close()
    Exit
    EndFunc ;==>Form1Close
    Func Form1Maximize()

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

    EndFunc ;==>Form1Maximize
    Func Form1Minimize()

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

    EndFunc ;==>Form1Minimize
    Func Form1Restore()

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

    EndFunc ;==>Form1Restore

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

    Func Aktual_Uhr()
    $Zeit = @HOUR & @MIN & @SEC
    If $Zeit = $Old_Zeit Then

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

    Else
    $Led_1 = StringMid($Zeit, 1, 1)
    $Led_2 = StringMid($Zeit, 2, 1)
    $Led_3 = StringMid($Zeit, 3, 1)
    $Led_4 = StringMid($Zeit, 4, 1)
    $Led_5 = StringMid($Zeit, 5, 1)
    $Led_6 = StringMid($Zeit, 6, 1)

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

    GUICtrlSetImage($Pic1, @TempDir & "\" & $Led_1 & ".jpg")
    GUICtrlSetImage($Pic2, @TempDir & "\" & $Led_2 & ".jpg")
    GUICtrlSetImage($Pic3, @TempDir & "\" & $Led_3 & ".jpg")
    GUICtrlSetImage($Pic4, @TempDir & "\" & $Led_4 & ".jpg")
    GUICtrlSetImage($Pic5, @TempDir & "\" & $Led_5 & ".jpg")
    GUICtrlSetImage($Pic6, @TempDir & "\" & $Led_6 & ".jpg")
    $Old_Zeit = $Zeit
    EndIf
    EndFunc ;==>Aktual_Uhr

    [/autoit]


    EDIT: KP der autoit code will net^^
    Edit bernd670: Darstellung von BBCodes war deaktivert! Spoiler gesetzt!

    3 Mal editiert, zuletzt von Matthias_199 (10. September 2009 um 13:27)

  • Wow, sieht echt cool aus :D Und das obwohl der Script ja relativ einfach ist ;)
    Vllt könnte man noch n Tray-Icon einbauen, über das man Optionen einstellen kann, wie zum Beispiel automatischen Start mit WIndows und OnTop-Flag/Transparenz.

  • mache ich oscar.

    Ja monentan ist sie sicher einfach vlt kommt noch eine stopuhr hinzu
    das mit dem tray icon überlege ich mir noch es ist ja absichtlich aber das mit der transparenz ist im moment keine gute ide den der hintergrund der bilder ist schwarz^^

  • Tolle, Idee, Tolle Umsetzung! Aber der 1er sit auf der falschen Seite!
    mfg

    MfG. tobi_girst

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

  • aaaaaaaaaaaah, ich werde verrückt, wie oft hast du den rar-Ordner ineinander verschachtelt. Ich bin jetzt bestimmt beim 15 mal angelangt. Ihrgentwie hab ich so das Gefühl Icarc will mich verkackeiern.