Sign in to follow this  
Followers 0
stackover

What I am doing wrong now?

8 posts in this topic

#1 ·  Posted (edited)

Look into code...

Edited... Full source in post below. Thanks

Dont know what im doing wrong in $ChangingCleanBot switch ... that dont switch when I press again F7 ... Any one saw an error in code ?

Edited by stackover

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I don't think you need the "If @HotkeyPressed(F7)" part since I think it's telling the script to ignore the rest of the function

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

Sry ... I ll post full source then pll can see why I have If @hotkey.... Sorry .. Here we go..

HotkeySet ("{F5}", "OnOff")
HotkeySet ("{F6}", "OnOff")
HotkeySet ("{F7}", "OnOff")

Global $ClickMouseDireito = False
Global $ClickMouseEsquerdo = False
Global $AutoCleanMode1 = False
Global $AutoCleanMode2 = False
Global $AutoCleanModeOFF = False
Global $AutoCleanOnOff = False
Global $TimerStatus = 0
Global $ChangingCleanBot = 0

Func OnOff()

;-------------------------------------------------------------------------------------------
;--- Função p/ Click Direito do Mouse ------------------------------------------------------
;-------------------------------------------------------------------------------------------    
    If @HotKeyPressed = '{F5}' Then
        $ClickMouseDireito = True
        Call ( "RequestOff" )
    EndIf
    
;-------------------------------------------------------------------------------------------
;--- Função p/ Click Esquerdo do Mouse -----------------------------------------------------
;-------------------------------------------------------------------------------------------
    If @HotKeyPressed = '{F6}' Then
        $ClickMouseEsquerdo = True
        Call ( "RequestOff" )
    EndIf
    
    If @HotKeyPressed = '{F7}' Then
        $ChangingCleanBot = $ChangingCleanBot + 1
        If $AutoCleanMode1 = False Then
        $AutoCleanMode1 = True
        $TimerStatus = 1
        Else
        ;$AutoCleanMode1 = True
        $AutoCleanOnOff = False
        Endif
    EndIf
EndFunc
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;----------------------------------- Manter o Bot ------------------------------------------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
While 1
;-------------------------------------------------------------------------------------------
;--- Função p/ Click Direito do Mouse ------------------------------------------------------
;-------------------------------------------------------------------------------------------
    If $ClickMouseDireito Then
        MouseDown ("Right")
        Call ("Desfoque")
        Send (" ")
        MouseUp ("Right")
        Sleep(50)
    EndIf
;-------------------------------------------------------------------------------------------
;--- Função p/ Click Esquerdo do Mouse -----------------------------------------------------
;-------------------------------------------------------------------------------------------
    If $ClickMouseEsquerdo Then
        MouseDown ("Left")
        Call ("Desfoque")
        Send (" ")
        MouseUp ("Left")
        Send (" ")
        Sleep(60)
    EndIf

;-------------------------------------------------------------------------------------------
;--- Função p/ Auto Clean Modo 1 -----------------------------------------------------------
;-------------------------------------------------------------------------------------------
    If $AutoCleanMode1 Then
        Switch $ChangingCleanBot
            Case 1
            If Not $AutoCleanOnOff Then
                $AutoCleanOnOff = True
                $ContAutoClean = TimerInit()
            ElseIf TimerDiff($ContAutoClean) >= $Time4Clean Then
                Switch $TimerStatus
                    case 1
                        Call("AutoCleanM1_1st")
                        $TimerStatus=2
                    case 2
                        Call("AutoCleanM1_2nd")
                        $TimerStatus=1
                EndSwitch
                $AutoCleanOnOff = False
            EndIf
            
            Case 2
            If Not $AutoCleanOnOff Then
                $AutoCleanOnOff = True
                $ContAutoClean = TimerInit()
            ElseIf TimerDiff($ContAutoClean) >= $Time4Clean Then
                Call("AutoCleanM2")
                $AutoCleanOnOff = False
            EndIf
        
            Case 3  
            $ChangingCleanBot = 0
        EndSwitch
    EndIf
    
WEnd

Share this post


Link to post
Share on other sites

You do not need calls!!!

User ()

is the same as

Call ( "User" )

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

But part of switch works normal. When I press F7 to increase +1 in variable $ChangingCleanBot only still work this part:

Switch $ChangingCleanBot
            Case 1
            If Not $AutoCleanOnOff Then
                $AutoCleanOnOff = True
                $ContAutoClean = TimerInit()
            ElseIf TimerDiff($ContAutoClean) >= $Time4Clean Then
                Switch $TimerStatus
                    case 1
                        Call("AutoCleanM1_1st")
                        $TimerStatus=2
                    case 2
                        Call("AutoCleanM1_2nd")
                        $TimerStatus=1
                EndSwitch
                $AutoCleanOnOff = False
            EndIf

I need when press F7 change between Cases of Switch $ChangingCleanBot.

Edited by stackover

Share this post


Link to post
Share on other sites

Any can help?

Share this post


Link to post
Share on other sites

Its that but a PM of a guy help me and I can fix the script ..thanks

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