TomaSzz Posted May 24, 2010 Share Posted May 24, 2010 ok ive got this far and error... when i run this script it gives error like this: Error:"Case" statement with no matching "Select" or "switch" statement. but where are the Case $ch and Case $ch1 ... if i only have Case $ch1 there that error dont come up and program works fine...but if i add after [Case $ch] this Case $ch1 i get that error... so i believe problem is with those 2? but what is it omg.. expandcollapse popup#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #include <GuiButton.au3> #include <File.au3> #include <IE.au3> #include <INet.au3> #include <StaticConstants.au3> #include <ProgressConstants.au3> #include <GuiTab.au3> #include <TabConstants.au3> Global Const $SC_DRAGMOVE = 0xF012 Global $iMemo HotKeySet("{ESC}", "On_Exit") ; Press ESC to exit Func On_Exit() Exit EndFunc Local $btn, $chk, $rdo, $Msg, $exit, $a, $i Local $file = "cabalmain.exe" Local $forum, $oIE, $min, $w, $w1, $1Enter Local $timestopress, $timesdone, $timesdopress Local $ch, $channelINI, $channel $hGUI = GUICreate("launcher", 642, 493, -1, -1, $WS_POPUP, $WS_EX_LAYERED) Opt("TrayIconHide", 1) GUICtrlCreatePic("Launcher\GUI\gfx\MAIN copy.jpg", 0, 0, 642, 493) GUICtrlSetState(-1, $GUI_DISABLE) ; Do not forget to disable the background $hTab = GUICtrlCreateTab(0, 0, 0, 0) $TabSheet1 = GUICtrlCreateTabItem("Acces");==>add more controls into this down there...for this tab only $Label1 = GUICtrlCreateLabel("Acces/Password:", 3, 56, 100, 30) $Enter = GUICtrlCreateButton("Button1", 140, 91, 120, 30, $BS_BITMAP) $Label2 = GUICtrlCreateLabel("This bot is made by ForceHacks™ ©2010", 0, 0, 100, 50) _GUICtrlButton_SetImage($Enter, "Login copy.bmp") $sInput = GUICtrlCreateInput("", 96, 54, 233, 21) $TabSheet2 = GUICtrlCreateTabItem("BOT");here you can put more controls $ch = GUICtrlCreateButton("Login", 245, 50, 50, 20) $Label2 = GUICtrlCreateLabel("This bot is made by ForceHacks™ ©2010", 0, 0, 100, 50) $Label3 = GUICtrlCreateInput("channel", 135, 50, 100, 20) $Label4 = GUICtrlCreateLabel("Mercury Server", 60, 50, 100, 50) $Label5 = GUICtrlCreateInput("channel", 135, 80, 100, 20) $Label6 = GUICtrlCreateLabel("Mars Server", 60, 80, 100, 50) $Label7 = GUICtrlCreateInput("channel", 135, 110, 100, 20) $Label8 = GUICtrlCreateLabel("Jupiter Server", 60, 110, 100, 50) $ch1 = GUICtrlCreateButton("Login", 245, 80, 50, 20) $ch2 = GUICtrlCreateButton("Login", 245, 110, 50, 20) GUICtrlCreateTabItem("");==>add control for both tabs GUISetState(@SW_SHOW) MemoWrite("Button1 Image Handle: " & _GUICtrlButton_GetImage($btn)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_PRIMARYDOWN ; Mouse button down _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; Tell GUI to drag with the mouse $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop Case $Enter _GUICtrlTab_ClickTab($hTab, 1, "left", True) Case $ch If WinExists("CABAL") Then WinActivate("CABAL") Sleep(400) Send(GUICtrlRead($sInput)) Sleep(400) Send("{ENTER}") Sleep(6000) Sleep(4000) Send("{RIGHT}") Sleep(400) $ch = 0 $channel = GUICtrlRead($Label3) do send("{Down}") $ch = $ch + 1 sleep(500) until $ch = $channel Send("{RIGHT}") Sleep(400) Send("{ENTER}") Else MsgBox(64, "Error", "Cabal window not found!Please Start the game then run the bot!") Exit $hGUI Case $ch1 If WinExists("CABAL") Then WinActivate("CABAL") Sleep(400) Send(GUICtrlRead($sInput)) Sleep(400) Send("{ENTER}") Sleep(6000) Sleep(4000) Send("{RIGHT}") Sleep(400) $ch = 0 $channel = GUICtrlRead($Label3) do send("{Down}") $ch = $ch + 1 sleep(500) until $ch = $channel Send("{DOWN}") Send("{RIGHT}") Sleep(400) Send("{ENTER}") Else MsgBox(64, "Error", "Cabal window not found!Please Start the game then run the bot!") Exit $hGUI EndSwitch WEnd Exit ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite Link to comment Share on other sites More sharing options...
omikron48 Posted May 24, 2010 Share Posted May 24, 2010 (edited) Your IF...Then lacks an EndIf capping the end. Check the help file on using If...Then...EndIf Edited May 24, 2010 by omikron48 Link to comment Share on other sites More sharing options...
TomaSzz Posted May 24, 2010 Author Share Posted May 24, 2010 aa ofc ..endif ty for taing ur time to read over my script.. Link to comment Share on other sites More sharing options...
Bowmore Posted May 24, 2010 Share Posted May 24, 2010 You need an EndIf to match the line If WinExists("CABAL") Then "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook 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