以防万一有一天某个可怜的灵魂偶然发现了这一点,使用上面@rojo 建议的 AutoIt - 这是我编写的完成我需要的脚本:
; Initiate Script
Main()
Func Main()
; Infinite loop
While 0 < 1
If CheckTime() == true Then
If CheckInternetConnection() == true Then
; Internet Connection is true
; So no worries
Else
; Internet Connection is false
; Perform mouse click
MouseClick("left")
EndIf
EndIf
; Sleep for 15 minutes
Sleep(60000 * 15)
WEnd
EndFunc
; The function checks if the current time is between 00:00 and 05:00
Func CheckTime()
If @Hour >= 00 AND @Hour <= 05 Then
Return true
Else
Return false
EndIf
EndFunc
; The function checks if currently is a internet connection
Func CheckInternetConnection()
Local $Connected = false
$ping = Ping("www.google.com")
If $ping > 0 Then
$Connected = true
EndIf
Return $Connected
EndFunc
然后,只需将代码保存在具有 .au3 文件扩展名的文件中,双击即可享受。