stackover Posted January 27, 2007 Share Posted January 27, 2007 (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 January 27, 2007 by stackover Link to comment Share on other sites More sharing options...
BALA Posted January 27, 2007 Share Posted January 27, 2007 (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 January 27, 2007 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 Link to comment Share on other sites More sharing options...
stackover Posted January 27, 2007 Author Share Posted January 27, 2007 Sry ... I ll post full source then pll can see why I have If @hotkey.... Sorry .. Here we go.. expandcollapse popupHotkeySet ("{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 Link to comment Share on other sites More sharing options...
McGod Posted January 27, 2007 Share Posted January 27, 2007 You do not need calls!!! User () is the same as Call ( "User" ) [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
stackover Posted January 27, 2007 Author Share Posted January 27, 2007 (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 January 27, 2007 by stackover Link to comment Share on other sites More sharing options...
stackover Posted January 28, 2007 Author Share Posted January 28, 2007 Any can help? Link to comment Share on other sites More sharing options...
BALA Posted January 28, 2007 Share Posted January 28, 2007 Are you saying that you want to execute the next case once you press F7? [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 Link to comment Share on other sites More sharing options...
stackover Posted January 28, 2007 Author Share Posted January 28, 2007 Its that but a PM of a guy help me and I can fix the script ..thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now