Jump to content

Recommended Posts

Posted

Everything was working then I added a few things and it stopped working. It's failry Simply thus far.

But When The ControlPanel() loads the embedded IE works fune, but no other object will work such

as the buttons or even exiting out the window, even though I have the GuiGetMsg() loop set up.

Alright here is my code, someone tell me whats wrong with it, please.

CODE
#include <GuiConstants.au3>

#include <IE.au3>

HotKeySet("{ESC}", "ExitApp") ;If you can't close, hit ESC to close

MsgBox(48, "IMPORTANT!!", "Read The Following Messege Then Close It To Begin.")

StartUp()

ControlPanel()

Func StartUp()

GuiCreate("RwK Smart Clicker v-3.0 Beta", 300, 300)

GUICtrlCreateEdit( _

" RaceWarKingdoms Smart Clicker v-3.0 Beta Release" & @CRLF & _

" " & @CRLF & _

" - RwK Smart Clicker 3.0 works by taking control of " & @CRLF & _

" your mouse and running through a serious of set " & @CRLF & _

" behaviors. These 'behaviors' are run through " & @CRLF & _

" a priority check, thus being very effective while " & @CRLF & _

" training. You could virtually play for hours while" & @CRLF & _

" you worked on other things. " & @CRLF & _

" " & @CRLF & _

" - Set Up To Help You Play Without Doing Any Real Work"& @CRLF & _

" " & @CRLF & _

" - Just Choose Your Monster And Click The 'Go' Button" & @CRLF & _

" " & @CRLF & _

" - WARNING: Security Checks Currently Do NOT Pass " & @CRLF & _

" themselves. You must pause the script by pressing " & @CRLF & _

" F5, then pass the check yourself, then resume by " & @CRLF & _

" pressing the 'Go' Button again. " & @CRLF & _

" *** I AM NOT RESPONSIBLE FOR ANY ACCOUNTS BANNED ***" & @CRLF _

, 0, 0, 300, 300, $ES_READONLY)

GuiSetState(@SW_SHOW)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then

ExitLoop

EndIf

WEnd

GuiDelete()

EndFunc

Func ControlPanel()

_IEErrorHandlerDeRegister()

$objIE = _IECreateEmbedded() ;$objIE will be an embedded IE window object

$controlPanel = GuiCreate("RwK Smart Clicker v-3.0", 900, 550, 0, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$GUIActiveX = GUICtrlCreateObj($objIE, 100, 0, 800, 550) ;embedded IE window

$btnTrain = GuiCtrlCreateButton("GO", 5, 5, 90, 30)

GuiSetState(@SW_SHOW, $controlPanel) ; Show Gui

_IENavigate($objIE, "rwk2.racewarkingdoms.com") ;navigate the window to RwK server 2

;keep aplication running until "x"d out

While 1

$guiMsg = GUIGetMsg()

Select

Case $guiMsg = $GUI_EVENT_CLOSE

Exit

Case $btnTrain

$TrainConfirm = MsgBox(4, "Start Training??", "The Script Will Now Take Control of Your Mouse Until You Press F5, Continue?")

If $TrainConfirm = 6 Then

Test()

EndIf

EndSelect

WEnd

EndFunc

;temporary filler function for testing

Func Test()

MsgBox(0, "Test", "Test Successfull")

EndFunc

Func ExitApp()

Exit

EndFunc

Posted

Never mind, turns out that the site I connected to is streaming the top banner. For some reason I can't activate GUI until the entire thing is loaded.. Since it takes a while for the banner to play, I'm just gonna find a way to bypass it.

Posted

You could try using the noWait parameter with _IENavigate...

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

You could try using the noWait parameter with _IENavigate...

Dale

Ha ha, I completly overlooked that... Already started on another version of the script... good thing I saved the old one. Thanks, Dale.

I feel ignorant.. ha ha.. but my script works now.. :whistle:

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...