Advertisement
Guest User

Untitled

a guest
Dec 30th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.45 KB | None | 0 0
  1. Func safecheck($action, $check_action, $error_action)
  2. Local $attempts = 3
  3. Do
  4.     $attempts -= 1
  5.     Call($action)
  6.     sleep(1000)
  7. Until Call($check_action) Or $attempts = 0
  8.  
  9. If Not Call($check_action) And $attempts = 0 Then
  10.     Local $attempts = 2
  11.     Do
  12.     $attempts -= 1
  13.     Call($error_action)
  14.     sleep(1000)
  15.   Until Call($check_action) Or $attempts = 0
  16. EndIf
  17.  
  18. If Not Call($check_action) And $attempts = 0 Then
  19.     alarm()
  20. EndIf
  21. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement