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
31
32
33
34
35
36
37
38
39
40
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$start = 1
; Переменные для Win8 x64
; Окно программы ReBot
$rebot_window = "[CLASS:WindowsForms10.Window.8.app.0.3551b1b_r11_ad1]"
; Кнопка Start
$start_stop_button = "[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r11_ad1; INSTANCE:13]"
; Окно для получения премиум доступа
$prem_window = "Premium Bot"
; Кнопка Run Demo
$rundemo_button = "[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r11_ad1; INSTANCE:2]"
; Пауза между перезапуском равная 29 минутам
$pause = 29 * 60000
While 1
$hWnd = WinWait($rebot_windwow, "", 5)
WinActivate($hWnd)
If $start = 0 Then
; Stop
ControlClick($hWnd, "", $start_stop_button, "left", 1)
Sleep(1800)
EndIf
; Start
ControlClick($hWnd, "", $start_stop_button, "left", 1)
Sleep(1800)
; Run Demo
$prem = WinWait($prem_window, "", 5)
WinActivate($prem)
ControlClick($prem, "", $rundemo_button, "left", 1)
Sleep($pause)
$start = 0
WEnd