Hallo Gemeinde ich hab erneut ein kleines Problemchen.... und zwar
versuche ich ein script zu erstellen der die Aktuelle Uhrzeit mit einer anderen Uhrzeit aus einer txt zu vergleicht und wenn es die gleiche ist, soll ein Alarm ausgeführt werden, jedoch fällt mir selbst unter einbezug der helpfiles kein passender Lösungsweg ein.
Ich denke mal das es gar nicht so schwierig ist aber ich komme nicht darauf.
Vielen Dank schonmal
Mfg Eistee
Script :
Spoiler anzeigen
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#Include <Constants.au3>
#include <ModernMenu.au3>
#include <GUIConstantsEx.au3>
$Posi1 = FileReadLine("C:\Excite\Clock\Position.txt",1)
$Posi2 = FileReadLine("C:\Excite\Clock\Position.txt",2)
$Posit1 = $Posi1 + 25
$Posit2 = $Posi2 - 99
$Style2 = FileReadLine("C:\Excite\Clock\Style.txt",1)
$Style = "C:\Excite\Clock\"& $Style2 & "\BG1A.jpg"
$Time = FileReadLine("C:\Excite\Clock\AlertTime.txt",1)
$ATime = @HOUR & ":" & @MIN & ":" & @SEC
$SoundCH = FileReadLine("C:\Excite\Clock\AlertSound.txt",1)
$Form1 = GUICreate("ExciteAlertActive", 250, 100, $Posit1, $Posit2,$WS_POPUP)
$Button1 = GUICtrlCreateButton("Stop", 85, 37, 80, 26, 0)
$Pic1 = GUICtrlCreatePic($Style, 0, 0, 250, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_Hide)
_AlertTimer ()
AdlibEnable("_AlertTimer",500)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Stop ()
EndSwitch
WEnd
Func _AlertTimer ()
If $Time = $Atime Then
GUISetState(@SW_SHOW)
SoundPlay($SoundCH,1)
Sleep(1000)
FileDelete("C:\Excite\Clock\AlertTime.txt")
Exit
EndIf
EndFunc
Func _Stop ()
SoundPlay("")
Sleep(200)
Exit
EndFunc