Jump to content

The program not work help pls


 Share

Recommended Posts

The program not work

Pls help me

Thnx..

Posted Image

#include <GUIConstants.au3>
#Include <Date.au3>


Global $Timer1 = 0
Global $Timer2 = 0
Global $Timer3 = 0
Global $Timer4 = 0
Global $Timer5 = 0

Opt("GUICoordMode", 1)
GUICreate("Gariban Bota hoşgeldiniz")  ; TITLE DUR



;Beginning of display
Guictrlcreatelabel ("By made sin2018", 10, 6)

$ssro = GUICtrlCreateButton("START SRO", 260,130, 100,20)
$start = GUICtrlCreateButton("START", 260,150, 100,20)
$exit = GUICtrlCreateButton("EXIT", 260,170, 100,20)
$buff1check = GUICtrlCreateCheckbox("",50,150,25,25)
$buff2check = GUICtrlCreateCheckbox("",50,180,25,25)
$buff3check = GUICtrlCreateCheckbox("",50,210,25,25)
$buff4check = GUICtrlCreateCheckbox("",50,240,25,25)
$buff5check = GUICtrlCreateCheckbox("",50,270,25,25)


$buff1duration = GUICtrlCreateInput("1000",87,153,40,20)
$buff2duration = GUICtrlCreateInput("5000",87,183,40,20)
$buff3duration = GUICtrlCreateInput("6000",87,213,40,20)
$buff4duration = GUICtrlCreateInput("7000",87,243,40,20)
$buff5duration = GUICtrlCreateInput("8000",87,273,40,20)

$buff1input = GUICtrlCreateInput("1",175,153,35,20)
$buff2input = GUICtrlCreateInput("2",175,183,35,20)
$buff3input = GUICtrlCreateInput("3",175,213,35,20)
$buff4input = GUICtrlCreateInput("4",175,243,35,20)
$buff5input = GUICtrlCreateInput("5",175,273,35,20)

GUISetState ()

GUICtrlCreateGroup ("Buffer Auto", 20, 100, 205, 205)

GUICtrlCreateLabel("Alugo Bot por 30 reais 200h",20,40)
GUICtrlCreateLabel("Coloque o tempo dos buffers. (em seconds)",20,55)
GUICtrlCreateLabel("Selecione os numeros aonde esta os skill",20,70)


GUICtrlCreateLabel("Seçiniz",40,120)
GUICtrlCreateGroup ("",30, 110, 45, 30)

GUICtrlCreateLabel("Zaman",100,120)
GUICtrlCreateGroup ("",95, 110, 50, 30)

GUICtrlCreateLabel("secs",130,158)
GUICtrlCreateLabel("secs",130,188)
GUICtrlCreateLabel("secs",130,218)
GUICtrlCreateLabel("secs",130,248)
GUICtrlCreateLabel("secs",130,278)

GUICtrlCreateLabel("Tuşlar",180,120)
GUICtrlCreateGroup ("",170, 110, 40, 30)

$buff1slot = GUICtrlCreateUpdown($buff1input)
$buff2slot = GUICtrlCreateUpdown($buff2input)
$buff3slot = GUICtrlCreateUpdown($buff3input)
$buff4slot = GUICtrlCreateUpdown($buff4input)
$buff5slot = GUICtrlCreateUpdown($buff5input)
GUICtrlSetLimit($buff1slot,9,0)
GUICtrlSetLimit($buff2slot,9,0)
GUICtrlSetLimit($buff3slot,9,0)
GUICtrlSetLimit($buff4slot,9,0)
GUICtrlSetLimit($buff5slot,9,0)
;----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------^^^^^^^^^^^DISPLAY


;Beginning button and functions
While 1
      $msg = GUIGetMsg()
      Select
Case $msg = $GUI_EVENT_CLOSE
         Exitloop
        Case $msg = $GUI_EVENT_MINIMIZE
        Case  $msg = $Exit
         Exitloop
         Case  $msg =  $buff1check
      if GUICtrlRead($buff1check) = 1 Then
          send("{F1}")
            GUICtrlSetState($buff1input, $GUI_ENABLE)
            GUICtrlSetState($buff1input, $GUI_ENABLE)
        Else
          GUICtrlSetState($buff1duration, $GUI_DISABLE)
          GUICtrlSetState($buff1input, $GUI_DISABLE)
          
      EndIf
 Case $msg =  $buff2check
      if GUICtrlRead($buff2check) = 1 Then
            GUICtrlSetState($buff2input, $GUI_ENABLE)
            GUICtrlSetState($buff2input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff2duration, $GUI_DISABLE)
          GUICtrlSetState($buff2input, $GUI_DISABLE)
      EndIf
  Case $msg =  $buff3check
      if GUICtrlRead($buff3check) = 1 Then
            GUICtrlSetState($buff3input, $GUI_ENABLE)
            GUICtrlSetState($buff3input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff3duration, $GUI_ENABLE)
          GUICtrlSetState($buff3input, $GUI_ENABLE)
      EndIf
  Case $msg =  $buff4check
      if GUICtrlRead($buff4check) = 1 Then
            GUICtrlSetState($buff4input, $GUI_ENABLE)
            GUICtrlSetState($buff4input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff4duration, $GUI_DISABLE)
          GUICtrlSetState($buff4input, $GUI_DISABLE)
      EndIf
      Case $msg =  $buff5check
      if GUICtrlRead($buff5check) = 1 Then
            GUICtrlSetState($buff5input, $GUI_ENABLE)
            GUICtrlSetState($buff5input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff5duration, $GUI_DISABLE)
          GUICtrlSetState($buff5input, $GUI_DISABLE)
      EndIf
      send("{F1}")
EndSelect



$buff1duration = TimerInit()
$buff2duration = TimerInit()
$buff3duration = TimerInit()
$buff4duration = TimerInit()
$buff5duration = TimerInit()

$msg = GUIGetMsg()
Select

Case $msg = $start
WinWaitActive("sro_client")
WinActive("sro_client")
    sleep(500)
    ;1nd buff
        if TimerDiff($buff1duration) > $buff1duration Then
            ;buff started
            send($buff1input)
            sleep(1000)
        EndIf
    ;2nd buff
        if TimerDiff($buff2duration) > $buff2duration Then
            ;buff started
            send($buff2input)
            sleep(1000)
        EndIf
    ;3rd buff
        if TimerDiff($buff3duration) > $buff3duration Then
            ;buff started
            send($buff3input)
            sleep(1000)
        EndIf
    ;4nd buff
        if TimerDiff($buff4duration) > $buff4duration Then
            ;buff started
            send($buff4input)
            sleep(1000)
        EndIf
    ;5nd buff
        if TimerDiff($buff5duration) > $buff5duration Then 
            ;buff started
            send($buff5input)
            sleep(1000)
        EndIf
EndSelect
WEnd
Link to comment
Share on other sites

Without further checking

right off the top I spotted this

if GUICtrlRead($buff1check) = 1 Then
          send("{F1}")
            GUICtrlSetState($buff1input, $GUI_ENABLE)
            GUICtrlSetState($buff1input, $GUI_ENABLE)
        Else
          GUICtrlSetState($buff1duration, $GUI_DISABLE)
          GUICtrlSetState($buff1input, $GUI_DISABLE)
          
      EndIf

I suspect that what you want is

if GUICtrlRead($buff1check) = 1 Then
          send("{F1}")
            GUICtrlSetState($buff1duration, $GUI_ENABLE)
            GUICtrlSetState($buff1input, $GUI_ENABLE)
        Else
          GUICtrlSetState($buff1duration, $GUI_DISABLE)
          GUICtrlSetState($buff1input, $GUI_DISABLE)
          
      EndIf

You have done the same thing in each of the If statements.

Also it's not a great idea to set state without checking the current state first.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

But , not work

pls help

#include <GUIConstants.au3>
#Include <Date.au3>


Global $Timer1 = 0
Global $Timer2 = 0
Global $Timer3 = 0
Global $Timer4 = 0
Global $Timer5 = 0

Opt("GUICoordMode", 1)
GUICreate("Gariban Bota hoşgeldiniz")  ; TITLE DUR



;Beginning of display
Guictrlcreatelabel ("By made sin2018", 10, 6)

$ssro = GUICtrlCreateButton("START SRO", 260,130, 100,20)
$start = GUICtrlCreateButton("START", 260,150, 100,20)
$exit = GUICtrlCreateButton("EXIT", 260,170, 100,20)
$buff1check = GUICtrlCreateCheckbox("",50,150,25,25)
$buff2check = GUICtrlCreateCheckbox("",50,180,25,25)
$buff3check = GUICtrlCreateCheckbox("",50,210,25,25)
$buff4check = GUICtrlCreateCheckbox("",50,240,25,25)
$buff5check = GUICtrlCreateCheckbox("",50,270,25,25)


$buff1duration = GUICtrlCreateInput("1000",87,153,40,20)
$buff2duration = GUICtrlCreateInput("5000",87,183,40,20)
$buff3duration = GUICtrlCreateInput("6000",87,213,40,20)
$buff4duration = GUICtrlCreateInput("7000",87,243,40,20)
$buff5duration = GUICtrlCreateInput("8000",87,273,40,20)

$buff1input = GUICtrlCreateInput("1",175,153,35,20)
$buff2input = GUICtrlCreateInput("2",175,183,35,20)
$buff3input = GUICtrlCreateInput("3",175,213,35,20)
$buff4input = GUICtrlCreateInput("4",175,243,35,20)
$buff5input = GUICtrlCreateInput("5",175,273,35,20)

GUISetState ()

GUICtrlCreateGroup ("Buffer Auto", 20, 100, 205, 205)

GUICtrlCreateLabel("Alugo Bot por 30 reais 200h",20,40)
GUICtrlCreateLabel("Coloque o tempo dos buffers. (em seconds)",20,55)
GUICtrlCreateLabel("Selecione os numeros aonde esta os skill",20,70)


GUICtrlCreateLabel("Seçiniz",40,120)
GUICtrlCreateGroup ("",30, 110, 45, 30)

GUICtrlCreateLabel("Zaman",100,120)
GUICtrlCreateGroup ("",95, 110, 50, 30)

GUICtrlCreateLabel("secs",130,158)
GUICtrlCreateLabel("secs",130,188)
GUICtrlCreateLabel("secs",130,218)
GUICtrlCreateLabel("secs",130,248)
GUICtrlCreateLabel("secs",130,278)

GUICtrlCreateLabel("Tuşlar",180,120)
GUICtrlCreateGroup ("",170, 110, 40, 30)

$buff1slot = GUICtrlCreateUpdown($buff1input)
$buff2slot = GUICtrlCreateUpdown($buff2input)
$buff3slot = GUICtrlCreateUpdown($buff3input)
$buff4slot = GUICtrlCreateUpdown($buff4input)
$buff5slot = GUICtrlCreateUpdown($buff5input)
GUICtrlSetLimit($buff1slot,9,0)
GUICtrlSetLimit($buff2slot,9,0)
GUICtrlSetLimit($buff3slot,9,0)
GUICtrlSetLimit($buff4slot,9,0)
GUICtrlSetLimit($buff5slot,9,0)
;----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------^^^^^^^^^^^DISPLAY


;Beginning button and functions
While 1
      $msg = GUIGetMsg()
      Select
Case $msg = $GUI_EVENT_CLOSE
         Exitloop
        Case $msg = $GUI_EVENT_MINIMIZE
        Case  $msg = $Exit
         Exitloop
         Case  $msg =  $buff1check
      if GUICtrlRead($buff1check) = 1 Then
          send("{F1}")
            GUICtrlSetState($buff1duration, $GUI_ENABLE)
            GUICtrlSetState($buff1input, $GUI_ENABLE)
        Else
          GUICtrlSetState($buff1duration, $GUI_DISABLE)
          GUICtrlSetState($buff1input, $GUI_DISABLE)
          
      EndIf
 Case $msg =  $buff2check
      if GUICtrlRead($buff2check) = 1 Then
            GUICtrlSetState($buff2duration, $GUI_ENABLE)
            GUICtrlSetState($buff2input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff2duration, $GUI_DISABLE)
          GUICtrlSetState($buff2input, $GUI_DISABLE)
      EndIf
  Case $msg =  $buff3check
      if GUICtrlRead($buff3check) = 1 Then
            GUICtrlSetState($buff3duration, $GUI_ENABLE)
            GUICtrlSetState($buff3input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff3duration, $GUI_ENABLE)
          GUICtrlSetState($buff3input, $GUI_ENABLE)
      EndIf
  Case $msg =  $buff4check
      if GUICtrlRead($buff4check) = 1 Then
            GUICtrlSetState($buff4duration, $GUI_ENABLE)
            GUICtrlSetState($buff4input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff4duration, $GUI_DISABLE)
          GUICtrlSetState($buff4input, $GUI_DISABLE)
      EndIf
      Case $msg =  $buff5check
      if GUICtrlRead($buff5check) = 1 Then
            GUICtrlSetState($buff5duration, $GUI_ENABLE)
            GUICtrlSetState($buff5input, $GUI_ENABLE)
      Else
          GUICtrlSetState($buff5duration, $GUI_DISABLE)
          GUICtrlSetState($buff5input, $GUI_DISABLE)
      EndIf
EndSelect



$buff1duration = TimerInit()
$buff2duration = TimerInit()
$buff3duration = TimerInit()
$buff4duration = TimerInit()
$buff5duration = TimerInit()

$msg = GUIGetMsg()
Select

Case $msg = $start
WinWaitActive("sro_client")
WinActive("sro_client")
    sleep(500)
    ;1nd buff
        if TimerDiff($buff1duration) > $buff1duration Then
            ;buff started
            send($buff1input)
            sleep(1000)
        EndIf
    ;2nd buff
        if TimerDiff($buff2duration) > $buff2duration Then
            ;buff started
            send($buff2input)
            sleep(1000)
        EndIf
    ;3rd buff
        if TimerDiff($buff3duration) > $buff3duration Then
            ;buff started
            send($buff3input)
            sleep(1000)
        EndIf
    ;4nd buff
        if TimerDiff($buff4duration) > $buff4duration Then
            ;buff started
            send($buff4input)
            sleep(1000)
        EndIf
    ;5nd buff
        if TimerDiff($buff5duration) > $buff5duration Then 
            ;buff started
            send($buff5input)
            sleep(1000)
        EndIf
EndSelect
WEnd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...