DOMANDA Autoit Script?

Pubblicità

Sirkus

Utente Attivo
Messaggi
168
Reazioni
0
Punteggio
48
Salve ho un bot scaricato da internet con AUTOIT , volevo sapere solo se è possibile far eseguire una pausa al bot ogni tot minuti e poi farlo ripartire. Ad esempio il BOT funziona normale per 5 minuti poi fa una pausa da 2 e riparte per poi fare di nuovo la pausa.
Qualcuno sa come si fa?
Grazie
 
Questo codice permette di eseguire un'azione solamente dopo tot minuti (in questo caso 2 minuti).
Sta a te modificare il tutto.
Codice:
$minutiPausa = 2
$hTimer = TimerInit()
While 1
    If TimerDiff($hTimer) > ($minutiPausa * 60000) Then
        ConsoleWrite("2 minuti passati!" & @CRLF)
        $hTimer = TimerInit()
    EndIf
WEnd
grazie ma io intendevo che faceva tutto quello che doveva fare e poi 2 min di pausa ogni 5 min di funzionamento
 
Scusa ma non so come settarlo e dove inserirlo... se mi puoi dare ancora un aiuto te ne sarei molto grato.
Questo è lo script

Global $sHeight = @DesktopHeight
Global $sWidth = @DesktopWidth
Global $UnPaused
HotKeySet("+1","_TogglePause") ; Premi Shift+1 per avviare il bot
HotKeySet("+2", "_Terminate") ; Premi Shift+2 per uscire


MsgBox(64, "CIAO", "FIFA 15 Autobuyer by zDeviLz - YOUTUBE ISTRUZIONI: 1. Loggare dentro FUT Web App 2. Aggiungere un giocatore con un adeguato prezzo 3. Ingrandire a full screen cliccando il bottone blu in alto a destra 4. Premere Shift+1 per far partire il bot e Shift+2 per terminarlo! . ")

While 1 ; Loop 1
Sleep(100) ; Waiting for function call. Pressing the Start hotkey ends this loop
ToolTip('Autobuyer in pausa. Premi Shift+1 per avviare il bot o Shift+2 per uscire .',0,0)
WEnd

Func _TogglePause()
ToolTip('Autobuyer avviato. Premi Shift+1 per avviare il bot o Shift+2 per uscire.',0,0)
$UnPaused = NOT $UnPaused
While $UnPaused ; Loop 2

MouseClick("left", 349, 838, 1, 5)
MouseClick("left", 101, 727, 1, 21)
MouseClick("left", 1058, 479, 1,9)
MouseClick("left", 588, 613, 1, 5)
MouseClick("left", 310, 579, 1, 1)
MouseClick("left", 649, 612, 1, 1)

WEnd
EndFunc
$primoRun = 1
$stato = 1
$minutiPausa = 2
$minutiRun = 5
$hTimer = TimerInit()
While 1
If ($primoRun <> 1) Then
If TimerDiff($hTimer) > ($minutiPausa * 60000) And ($stato == 0) Then
$stato = 1
$hTimer = TimerInit()
EndIf
EndIf
If TimerDiff($hTimer) > ($minutiRun * 60000) Then
$primoRun = 0
$stato = 0
$hTimer = TimerInit()
EndIf
If ($stato == 1) Then
;eseguo il programma
EndIf
WEnd


Func _Terminate()
If MsgBox(4, 'Vuoi davvero uscire?', 'Clicca si per uscire, o No per continuare') = 6 Then Exit
EndFunc ;==>_Pause
 
Avevo capito ciò che intendi, infatti ti ho dato tutto ciò che ti serve. Tocca a te modificare :D
Codice:
$primoRun = 1
$stato = 1
$minutiPausa = 2
$minutiRun = 5
$hTimer = TimerInit()
While 1
    If ($primoRun <> 1) Then
        If TimerDiff($hTimer) > ($minutiPausa * 60000) And ($stato == 0) Then
             $stato = 1
             $hTimer = TimerInit()
        EndIf
    EndIf
    If TimerDiff($hTimer) > ($minutiRun * 60000) Then
        $primoRun = 0
        $stato = 0
        $hTimer = TimerInit()
    EndIf
    If ($stato == 1) Then
        ;eseguo il programma
    EndIf
WEnd
 
Pubblicità
Pubblicità
Indietro
Top