Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Put GUI to sleep

$
0
0
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? :

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>