RequireAdmin include ButtonConstants au3 include EditConstants au3 inc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$start = 1
; Переменные для Win8 x64
$rebot_window = "[CLASS:WindowsForms10.Window.8.app.0.3551b1b_r11_ad1]" ; Окно программы ReBot
$start_stop_button = "[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r11_ad1; INSTANCE:13]" ; Кнопка Start
$prem_window = "Premium Bot" ; Окно для получения премиум доступа
$rundemo_button = "[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r11_ad1; INSTANCE:2]" ; Кнопка Run Demo
$pause = 29 * 60000 ; Пауза между перезапуском равная 29 минутам
While 1
$hWnd = WinWait($rebot_windwow, "", 5)
WinActivate($hWnd)
If $start = 0 Then
ControlClick($hWnd, "", $start_stop_button, "left", 1) ; Stop
Sleep(1800)
EndIf
ControlClick($hWnd, "", $start_stop_button, "left", 1) ; Start
Sleep(1800)
$prem = WinWait($prem_window, "", 5)
WinActivate($prem)
ControlClick($prem, "", $rundemo_button, "left", 1) ; Run Demo
Sleep($pause)
$start = 0
WEnd