Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ; Initiate Script
  2. Main()
  3.  
  4. Func Main()
  5. ; Infinite loop
  6. While 0 < 1
  7. If CheckTime() == true Then
  8. If CheckInternetConnection() == true Then
  9. ; Internet Connection is true
  10. ; So no worries
  11. Else
  12. ; Internet Connection is false
  13. ; Perform mouse click
  14. MouseClick("left")
  15. EndIf
  16. EndIf
  17. ; Sleep for 15 minutes
  18. Sleep(60000 * 15)
  19. WEnd
  20. EndFunc
  21.  
  22. ; The function checks if the current time is between 00:00 and 05:00
  23. Func CheckTime()
  24. If @Hour >= 00 AND @Hour <= 05 Then
  25. Return true
  26. Else
  27. Return false
  28. EndIf
  29. EndFunc
  30.  
  31. ; The function checks if currently is a internet connection
  32. Func CheckInternetConnection()
  33. Local $Connected = false
  34. $ping = Ping("www.google.com")
  35. If $ping > 0 Then
  36. $Connected = true
  37. EndIf
  38. Return $Connected
  39. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement