scriptnub Posted May 1, 2010 Share Posted May 1, 2010 #include <IE.au3> #include <String.au3> $oIE = _IECreate("http://www.immoral-attack.com") MsgBox("", "", "Press for start.") While 1 $oSubmit = _IEGetObjByName($oIE, "attack") _IEAction($oSubmit, "click") _IELoadWait($oIE) $String = _StringBetween(_IEBodyReadHTML($oIE), '<CENTER><A href="', '">Continue Slaying Monsters</A></CENTER>') If @error Then ClipPut(_IEDocReadHTML($oIE)) MsgBox("", "", "Error") Exit EndIf _IENavigate($oIE, "http://www.immoral-attack.com/" & $String[0]) WEnd This script was made for me a long time ago and I love it, only thing that could make it better is if instead of making me open a new page when the script Errors it just lets me keep the same page up and keep going from where it left off. Hopefully someone can assist me in making these changes thanks Link to comment Share on other sites More sharing options...
GEOSoft Posted May 1, 2010 Share Posted May 1, 2010 Are you refering to the @Error after the _StringBetween() call? If so just remove the Exit otherwise tell us where you are getting the error that forces you to open a new page. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
scriptnub Posted May 1, 2010 Author Share Posted May 1, 2010 (edited) Are you refering to the @Error after the _StringBetween() call? If so just remove the Exit otherwise tell us where you are getting the error that forces you to open a new page.The error occurs when I have a security check for the game. Once that happens the script closes and I'm forced to open the script again. When i open the new script it opens a new IE page to start the process overI'm wanting to start a new script without having to open a new IE page so I can use the page i'm already on Edited May 1, 2010 by scriptnub Link to comment Share on other sites More sharing options...
DW1 Posted May 2, 2010 Share Posted May 2, 2010 Perhaps something like this? #include <IE.au3> #include <String.au3> If WinExists("Immoral Attack") Then $oIE = _IEAttach("Immoral Attack") Else $oIE = _IECreate("http://www.immoral-attack.com") EndIf MsgBox("", "", "Press for start.") While 1 $oSubmit = _IEGetObjByName($oIE, "attack") _IEAction($oSubmit, "click") _IELoadWait($oIE) $String = _StringBetween(_IEBodyReadHTML($oIE), '<CENTER><A href="', '">Continue Slaying Monsters</A></CENTER>') If @error Then ClipPut(_IEDocReadHTML($oIE)) MsgBox("", "", "Error") Exit EndIf _IENavigate($oIE, "http://www.immoral-attack.com/" & $String[0]) WEnd AutoIt3 Online Help Link to comment Share on other sites More sharing options...
scriptnub Posted May 2, 2010 Author Share Posted May 2, 2010 Perhaps something like this? #include <IE.au3> #include <String.au3> If WinExists("Immoral Attack") Then $oIE = _IEAttach("Immoral Attack") Else $oIE = _IECreate("http://www.immoral-attack.com") EndIf MsgBox("", "", "Press for start.") While 1 $oSubmit = _IEGetObjByName($oIE, "attack") _IEAction($oSubmit, "click") _IELoadWait($oIE) $String = _StringBetween(_IEBodyReadHTML($oIE), '<CENTER><A href="', '">Continue Slaying Monsters</A></CENTER>') If @error Then ClipPut(_IEDocReadHTML($oIE)) MsgBox("", "", "Error") Exit EndIf _IENavigate($oIE, "http://www.immoral-attack.com/" & $String[0]) WEnd that did it... thank you 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