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
#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 ****
#include <GuiEdit.au3>
#include <GuiStatusBar.au3>
#include <GUIConstants.au3>
#include <GuiStatusBar.au3>
#include <GUIConstantsEx.au3>
#include <windowsconstants.au3>
#include <StaticConstants.au3>
#include <GUIConstants.au3>
AutoItSetOption("TrayIconHide", 1)
[/autoit] [autoit][/autoit] [autoit]Global $Old_Zeit, $Zeit, $n = 0, $m = 5, $Prozent, $Prozent_Round
Dim $Fe[13]
Dim $Fc[13]
$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)
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
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)
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 ###
While 1
Aktual_Uhr()
Sleep(100)
WEnd
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func Form1Maximize()
EndFunc ;==>Form1Maximize
Func Form1Minimize()
EndFunc ;==>Form1Minimize
Func Form1Restore()
EndFunc ;==>Form1Restore
[/autoit] [autoit][/autoit] [autoit]Func Aktual_Uhr()
$Zeit = @HOUR & @MIN & @SEC
If $Zeit = $Old_Zeit Then
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)
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
EDIT: KP der autoit code will net^^
Edit bernd670: Darstellung von BBCodes war deaktivert! Spoiler gesetzt!