mintydremora Posted April 25, 2013 Posted April 25, 2013 hey guys ime trying to create a bot and i need it to have a function but every time i run it it says that the func statement doesnt have a matching endfunc here is the func statement func browser() #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() $browser=Local $oIE = _IECreateEmbedded() GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) Local $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) Local $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) Local $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) Local $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) GUISetState() ;Show GUI _IENavigate($oIE, "http://www.youtube.com") ; Waiting for user to close the window While 1 Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IENavigate($oIE, "http://www.autoitscript.com") Case $msg = $GUI_Button_Back _IEAction($oIE, "back") Case $msg = $GUI_Button_Forward _IEAction($oIE, "forward") Case $msg = $GUI_Button_Stop _IEAction($oIE, "stop") EndSelect WEnd endfunc
jdelaney Posted April 25, 2013 Posted April 25, 2013 (edited) Using the word "Bot" in this forum is equivalent to using the word "bomb" on a plane...I wouldn't recommend it... Move your includes outside the function, and change: $browser=Local $oIE = _IECreateEmbedded() to: Local $oIE = _IECreateEmbedded() that fixes your syntax errors, at least Edited April 25, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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