Sign in to follow this  
Followers 0
Misha

Hi I am gonna kill mey self if u don't help me >:

4 posts in this topic

#Include <GuiConstants.au3>
Opt("WinTitleMatchMode", 3)
Opt("MouseClickDownDelay", 55)
Opt("MouseClickDelay", 1)
Opt("SendKeyDownDelay", 10)
Opt("SendKeyDelay", 1)
Opt("CaretCoordMode", 2)
GUICreate( "MU Summon",200,150)
GUICtrlCreateGroup("Options",5,5,195,145)
$AutoPicker=GUICtrlCreateCheckbox("AutoPicker While Afk",10,20)
GuiCtrlCreateLabel("None Safe Zone",10,40)
$x=GUICtrlCreateInput("X",10,55,40)
GUICtrlCreateUpdown($X)
GUICtrlSetLimit( $x,255,0)
$Y=GUICtrlCreateInput("Y",60,55,40)
GUICtrlCreateUpdown($y)
GUICtrlSetLimit( $y,255,0)
GuiCtrlCreateLabel("Safe Zone",100,40)
$x2=GUICtrlCreateInput("X",110,55,40)
GUICtrlCreateUpdown($X2)
GUICtrlSetLimit( $x2,255,0)
$Y2=GUICtrlCreateInput("Y",150,55,40)
GUICtrlCreateUpdown($y2)
GUICtrlSetLimit( $y2,255,0)
$Delay=GuiCtrlCreateInput("30",10,80,75)
GUICtrlCreateLabel("Delay in Min",90,85)
$startbutton=GUICtrlCreateButton("START",10,110,180)
GUISetState()
$TimerDiff = $Delay * 60000 + 1


While 1 
$msg = GuIGetMsg()
Select
    Case $msg = $GUI_EVENT_CLOSE 
        Exit
    Case $msg = $startbutton
        GUICtrlSetData( $startbutton,"STOP")
        if GuiCtrlRead($startbutton) = "START" Then
        $StartingTime=TimerInit()
While 1
if $TimerDiff > $Delay * 60000 And GuiCtrlRead($startbutton) = "START" Then
MouseMove(GuiCtrlRead($X),GuiCtrlRead($Y))
MouseClick("left")
Sleep(3000)
MouseClick("Right")
sleep(3000)
MouseMove(GUICtrlRead($x2),GUICtrlRead($y2))
Sleep(3000)
MouseClick("left")
$TimerDiff=TimerDiff($StartingTime)
Elseif $TimerDiff <= $delay * 60000 Then
$TimerDiff=TimerDiff($StartingTime)
if GuiCtrlRead( $autopicker) = $GUI_CHECKED Then
    Send(" ")
    Endif
Sleep(1000)
EndIf
$msg = GUIGetMsg()
Wend
Elseif GuiCtrlRead($startbutton) = "STOP" Then
While 1 
    Sleep(1000)
WEnd
EndIf
EndSelect

Wend

gui works only once and doesnt do the func of the Case $msg = $startbutton np.

assist and stuff.

Share this post


Link to post
Share on other sites



Nice title. Perhaps other options are available...

What is the script supposed to do?

You seem to have a logic issue with setting the button from "Start" to "Stop", and expect to read "Start" from it. So all you get is it going to the ElseIf statement with reading "Stop" and getting stuck in the While loop.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

my own if's are confuseing any chance u could post the code ;p

to note the code should work once as in mouse move and stuff then wait $delay time.. which are writen in min and I transfer them in to milisec by * 60000 doesnt work.

Edited by Misha

Share this post


Link to post
Share on other sites

You need to set a way to ExitLoop the first While statement to continue the script at some point which I am unsure of editting.

This may help you along some more

#Include <GuiConstants.au3>
Opt("WinTitleMatchMode", 3)
Opt("MouseClickDownDelay", 55)
Opt("MouseClickDelay", 1)
Opt("SendKeyDownDelay", 10)
Opt("SendKeyDelay", 1)
Opt("CaretCoordMode", 2)
GUICreate( "MU Summon", 200, 150)
GUICtrlCreateGroup("Options", 5, 5, 195, 145)
$AutoPicker = GUICtrlCreateCheckbox("AutoPicker While Afk", 10, 20)
GUICtrlCreateLabel("None Safe Zone", 10, 40)
$x = GUICtrlCreateInput("X", 10, 55, 40)
GUICtrlCreateUpdown($x)
GUICtrlSetLimit($x, 255, 0)
$Y = GUICtrlCreateInput("Y", 60, 55, 40)
GUICtrlCreateUpdown($Y)
GUICtrlSetLimit($Y, 255, 0)
GUICtrlCreateLabel("Safe Zone", 100, 40)
$x2 = GUICtrlCreateInput("X", 110, 55, 40)
GUICtrlCreateUpdown($x2)
GUICtrlSetLimit($x2, 255, 0)
$Y2 = GUICtrlCreateInput("Y", 150, 55, 40)
GUICtrlCreateUpdown($Y2)
GUICtrlSetLimit($Y2, 255, 0)
$Delay = GUICtrlCreateInput("30", 10, 80, 75)
GUICtrlCreateLabel("Delay in Min", 90, 85)
$startbutton = GUICtrlCreateButton("START", 10, 110, 180)
GUISetState()
$TimerDiff = $Delay * 60000 + 1


While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $startbutton
            If GUICtrlRead($startbutton) = "START" Then
                $StartingTime = TimerInit()
                While 1
                    ; Need a ExitLoop condition to get out of this loop somewhere?
                    If $TimerDiff > $Delay * 60000 And GUICtrlRead($startbutton) = "START" Then
                        MouseMove(GUICtrlRead($x), GUICtrlRead($Y))
                        MouseClick("left")
                        Sleep(3000)
                        MouseClick("Right")
                        Sleep(3000)
                        MouseMove(GUICtrlRead($x2), GUICtrlRead($Y2))
                        Sleep(3000)
                        MouseClick("left")
                        $TimerDiff = TimerDiff($StartingTime)
                    ElseIf $TimerDiff <= $Delay * 60000 Then
                        $TimerDiff = TimerDiff($StartingTime);?
                        If GUICtrlRead($AutoPicker) = $GUI_CHECKED Then
                            Send(" ")
                        EndIf
                        Sleep(1000)
                    EndIf
                    $msg = GUIGetMsg()
                    If $msg = $GUI_EVENT_CLOSE Then Exit
                WEnd
                GUICtrlSetData( $startbutton,"STOP"); Stop changed here
            ElseIf GUICtrlRead($startbutton) = "STOP" Then
                While 1
                    Sleep(1000)
                WEnd
            EndIf
    EndSelect
WEnd

Share this post


Link to post
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
Sign in to follow this  
Followers 0