Advertisement
Guest User

Untitled

a guest
Oct 10th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.78 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
  3. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  4. #include <ButtonConstants.au3>
  5. #include <EditConstants.au3>
  6. #include <GUIConstantsEx.au3>
  7. #include <StaticConstants.au3>
  8. #include <WindowsConstants.au3>
  9. #include <Misc.au3>
  10.  
  11. #Region ### START Koda GUI section ### Form=c:\users\pc\downloads\koda_1.7.2.0\forms\form1.kxf
  12.  
  13. $Form1_1 = GUICreate("Tab Wechsel + Enter <3", 600, 148, 193, 256)
  14.  
  15. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  16. $Label1 = GUICtrlCreateLabel("Gewünschte Verzögerung zwischen den Tabwechseln:", 21, 20, 350, 23)
  17. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  18. $delay_von_tabwechsel = GUICtrlCreateInput("0.1", 400, 17, 50, 27, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
  19. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  20. $delay_bis_tabwechsel = GUICtrlCreateInput("0.2", 460, 17, 50, 27, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
  21. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  22.  
  23. $Label2 = GUICtrlCreateLabel("Gewünschte Verzögerung beim absenden:", 21, 63, 328, 23)
  24. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  25. $delay_von_absenden = GUICtrlCreateInput("0.2", 400, 60, 50, 27, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
  26. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  27. $delay_bis_absenden = GUICtrlCreateInput("0.3", 460, 60, 50, 27, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
  28. GUICtrlSetFont(-1, 12, 400, 0, "Calibri")
  29.  
  30. $start_button = GUICtrlCreateButton("Start", 320, 103, 265, 29, $WS_GROUP)
  31. GUISetState(@SW_SHOW)
  32. #EndRegion ### END Koda GUI section ###
  33.  
  34. Global $g_bPaused = False
  35.  
  36. While 1
  37.     $nMsg = GUIGetMsg()
  38.     Switch $nMsg
  39.         Case $GUI_EVENT_CLOSE
  40.             Exit
  41.         Case $start_button
  42.             HotKeySet("{ESC}","_stop")
  43.             HotKeySet("{PAUSE}", "_Pause")
  44.             _StartBot()
  45.     EndSwitch
  46. WEnd
  47.  
  48. Func _StartBot()
  49.  
  50.     $delay_von_tabwechsel = GUICtrlRead($delay_von_tabwechsel)
  51.     $delay_bis_tabwechsel = GUICtrlRead($delay_bis_tabwechsel)
  52.     $delay_von_absenden = GUICtrlRead($delay_von_absenden)
  53.     $delay_bis_absenden = GUICtrlRead($delay_bis_absenden)
  54.  
  55.  
  56.     ToolTip("Script gestartet, Start in 5 Sekunden", 0, 0)
  57.     Sleep(5000)
  58.  
  59.     While True
  60.         $delay_tabwechsel = Random($delay_von_tabwechsel*1000, $delay_bis_tabwechsel*1000, 1)
  61.         ToolTip("Warte " & Round($delay_tabwechsel/1000) & " Sekunden, dann drücke 2", 0, 0)
  62.         Sleep($delay_tabwechsel)
  63.         tabsend()
  64.     WEnd
  65. EndFunc
  66.  
  67. Func tabsend()
  68.     Send("{2}")
  69.     $delay_absenden = Random($delay_von_absenden*1000, $delay_bis_absenden*1000, 1)
  70.     ToolTip("Warte " & Round($delay_absenden/1000) & " Sekunden, dann drücke Enter", 0, 0)
  71.     Sleep($delay_absenden)
  72.     Send("{ENTER}")
  73. EndFunc
  74.  
  75. Func _Pause()
  76.     $g_bPaused = Not $g_bPaused
  77.     While $g_bPaused
  78.         Sleep(100)
  79.         ToolTip('Script pausiert', 0, 0)
  80.     WEnd
  81.     ToolTip("")
  82. EndFunc
  83.  
  84. Func _Stop()
  85.    Exit
  86. endFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement