Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.61 KB | None | 0 0
  1. func sendOne($keyA, $keyB , $keyC, $Max)
  2.  
  3. Local $i, $rnd, $lastRnd
  4. $rnd = Round(Random(1, 3), 0)
  5.  
  6. If $Max = 3 Then
  7.  
  8. For $i = 1 To $Max
  9.    
  10.     If $lastRnd = 2 Or $lastRnd = 3 Then
  11.         $rnd = 1
  12.         ElseIf $lastRnd = 1 Or $lastRnd = 3  Then
  13.         $rnd = 2
  14.         ElseIf $lastRnd = 1 Or $lastRnd = 2 Then
  15.         $rnd = 3
  16.     EndIf
  17.    
  18.     Select
  19.        
  20.         Case $rnd == 1;uc (65-90)
  21.             ;MsgBox(0,"Status A", $rnd)
  22.             send($keyA)
  23.         Case $rnd == 2;lc (97-112)
  24.             ;MsgBox(0,"Status B", $rnd)
  25.             send($keyB)
  26.         Case $rnd == 3;nr (48-57)
  27.             ;MsgBox(0,"Status C", $rnd)
  28.             send($keyC)
  29.    
  30.     EndSelect
  31.  
  32.     $lastRnd = $rnd
  33.    
  34.     Next
  35.  
  36. endFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement