Hi there I am using a GUI with the onevent mode:
#include <Date.au3>
Local $Starttime = IniRead("settings.ini", "SectionstartTime", "Starttime", "Start Time Note Set")
Local $Endtime = IniRead("settings.ini", "SectionendTime", "Endtime", "End Time Note Set")
; Timer related
$CurrentTime = _NowTime(4)
GUI Stuff
...
...
...
; GUI Events
While 1
Sleep(100)
; Check Software Run Time or not
Switch @WDAY
Case 1,2,3,4,5,6,7
If ($CurrentTime > $StartTime AND $CurrentTime < $EndTime) Then
;SplashTextOn("Software", "Within Time Period: Running.", -1, -1, -1, -1, 3, "", 24)
;Sleep(3000)
;SplashOff()
GUISetState(@SW_SHOW)
ElseIf ($CurrentTime < $StartTime AND $CurrentTime > $EndTime) Then
;MSGBOX(0,"Software in Pause Mode","From "&$StartTime&" to: "&$EndTime)
SplashTextOn("Software", "Sleeping...", -1, -1, -1, -1, 3, "", 24)
Sleep(3000)
SplashOff()
GUISetState(@SW_HIDE)
EndIf
EndSwitch
WEnd
Why is this not working?
#include <Date.au3>
Local $Starttime = IniRead("settings.ini", "SectionstartTime", "Starttime", "Start Time Note Set")
Local $Endtime = IniRead("settings.ini", "SectionendTime", "Endtime", "End Time Note Set")
; Timer related
$CurrentTime = _NowTime(4)
GUI Stuff
...
...
...
; GUI Events
While 1
Sleep(100)
; Check Software Run Time or not
Switch @WDAY
Case 1,2,3,4,5,6,7
If ($CurrentTime > $StartTime AND $CurrentTime < $EndTime) Then
;SplashTextOn("Software", "Within Time Period: Running.", -1, -1, -1, -1, 3, "", 24)
;Sleep(3000)
;SplashOff()
GUISetState(@SW_SHOW)
ElseIf ($CurrentTime < $StartTime AND $CurrentTime > $EndTime) Then
;MSGBOX(0,"Software in Pause Mode","From "&$StartTime&" to: "&$EndTime)
SplashTextOn("Software", "Sleeping...", -1, -1, -1, -1, 3, "", 24)
Sleep(3000)
SplashOff()
GUISetState(@SW_HIDE)
EndIf
EndSwitch
WEnd
Why is this not working?
![:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/crying.gif)