Sign in to follow this  
Followers 0
Wisniske

IE.au3 (434) : ==> action with this object has failed

6 posts in this topic

#include <IE.au3>

$scr = IniRead("brooke.ini", "section2", "scroll_page_delay", "5000")

$cnt = IniRead("brooke.ini", "section2", "times_to_vote", "1000")

$fvd = IniRead("brooke.ini", "section2", "first_vote_delay", "2000")

;Webpage redirect from ini file

$re1 = IniRead("brooke.ini", "section1", "first_redirect", "not found")

$re2 = IniRead("brooke.ini", "section1", "second_redirect", "not found")

$oIE = _IECreate("www.vh1.com/shows/series/top_20_countdown/", 0, 1, 0, -1)

Sleep(2000)

Send("{ALTDOWN}{SPACE}{ALTUP}")

Send("x", 1)

Sleep($scr)

Send("{DOWN}{DOWN}{DOWN}")

Sleep(1000)

;Begin mouse movement

MouseMove(23, 277, 0)

Sleep($fvd)

MouseClick("left")

Sleep($fvd)

MouseMove(305, 399, 0)

Sleep($fvd)

MouseDown("left")

MouseMove(584, 250, 2)

MouseUp("left")

;Submit vote

Sleep(1000)

MouseMove(812, 630, 0)

Sleep(2000)

MouseClick("left")

Sleep(3000)

;;HERE IS WHERE THE PROBLEM OCCURS

_IENavigate($oIE, $re2, 1)

It just sits there and I get the following error:

C:\Program Files\AutoIt3\Include\IE.au3 (434) : ==> The requested action with this object has failed.:

$o_object.navigate ($s_Url)

$o_object.navigate ($s_Url)^ ERROR

It was working fine, then I had to have changed something???? I just can't figure out what.. :)

Share this post


Link to post
Share on other sites



There is no need for all the send/sleep junk. If you will give a detailed description of what you are trying to accomplish I'm sure we can simplify your script.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There is no need for all the send/sleep junk. If you will give a detailed description of what you are trying to accomplish I'm sure we can simplify your script.

The Sleeps are needed for the first run or it does not work right: Here is the whole code. What the script does is vote on vh1.com . I will also include the ini file it is reading from. The lines that are commented out are not used this week as they move the people around in the list.

Run it and you will see what it does.

InetGet("http://www.gamezrx.com/downloads/bbversion.ini", "bbversion.ini")

$chk = IniRead("bbversion.ini", "version", "ver", "NotFound")

If $chk > 1.4 Then

$size = InetGetSize("http://www.gamezrx.com/downloads/Brooke BOT.exe")

InetGet("http://www.gamezrx.com/downloads/Brooke BOT.exe", "c:\Program Files\Brooke BOT\Brooke BOT.exe", 1, 1)

While @InetGetActive

TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 5, 16)

Sleep(250)

WEnd

If @InetGetBytesRead <> $size Then MsgBox(16, "Brooke BOT Update", "Error occurred During Update", 10)

Else

EndIf

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

#include <IE.au3>

$scr = IniRead("brooke.ini", "section2", "scroll_page_delay", "5000")

$cnt = IniRead("brooke.ini", "section2", "times_to_vote", "1000")

$fvd = IniRead("brooke.ini", "section2", "first_vote_delay", "2000")

;Webpage redirect from ini file

$re1 = IniRead("brooke.ini", "section1", "first_redirect", "not found")

$re2 = IniRead("brooke.ini", "section1", "second_redirect", "not found")

$oIE = _IECreate("www.vh1.com/shows/series/top_20_countdown/", 0, 1, 0, -1)

Sleep(2000)

Send("{ALTDOWN}{SPACE}{ALTUP}")

Send("x", 1)

Sleep($scr)

Send("{DOWN}{DOWN}{DOWN}")

Sleep(1000)

;Begin mouse movement

MouseMove(23, 277, 0)

Sleep($fvd)

MouseClick("left")

Sleep($fvd)

;MouseMove(305, 399, 0)

;Scroll down to Brooke

;Sleep($fvd)

;MouseDown("left")

;MouseMove(527, 354, 2)

;MouseUp("left")

;Bring Brooke to number one

;Sleep($fvd)

MouseMove(305, 399, 0)

Sleep($fvd)

MouseDown("left")

MouseMove(584, 250, 2)

MouseUp("left")

;Submit vote

Sleep(1000)

MouseMove(812, 630, 0)

Sleep(2000)

MouseClick("left")

Sleep(3000)

_IENavigate($oIE, $re2, 1)

$i = 0

Do

#include <IE.au3>

Sleep(1000)

$i = $i + 1

Sleep(2000)

_IENavigate($oIE, "www.vh1.com/shows/series/top_20_countdown/", 1)

Sleep($scr)

Send("{DOWN}{DOWN}{DOWN}")

Sleep(1000)

;Begin mouse movement

MouseMove(23, 277, 0)

;MouseMove(527, 277, 0)

;Scroll down to Brooke

;MouseDown("left")

;MouseMove(527, 354, 2)

;Bring Brooke to number one

MouseMove(305, 399, 0)

MouseDown("left")

MouseMove(584, 250, 2)

MouseUp("left")

;Submit vote

Sleep(1000)

MouseMove(812, 630, 0)

Sleep(2000)

MouseClick("left")

Sleep(5000)

;#include <IE.au3>

_IENavigate($oIE, $re2, 1)

Sleep(3000)

_IENavigate($oIE, "www.vh1.com/shows/series/top_20_countdown/", 1)

Sleep($scr)

Send("{DOWN}{DOWN}{DOWN}")

Sleep(1000)

;Begin mouse movement

MouseMove(23, 277, 0)

;MouseMove(527, 277, 0)

;Scroll down to Brooke

;MouseDown("left")

;MouseMove(527, 354, 2)

;MouseUp("left")

;Bring Brooke to number one

MouseMove(305, 399, 0)

MouseDown("left")

MouseMove(584, 250, 2)

MouseUp("left")

;Submit vote

Sleep(1000)

MouseMove(812, 630, 0)

Sleep(2000)

MouseClick("left")

Sleep(5000)

;#include <IE.au3>

_IENavigate($oIE, $re1, 1)

Until $i = $cnt

_IEQuit($oIE)

MsgBox(4096, "Brooke Bot", "BOT COMPLETED WITH NO ERRORS")

;While 1

; Sleep(100)

;WEnd

;;;;;;;;

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(100)

ToolTip('Script is "Paused"', 0, 0)

WEnd

ToolTip("Script Paused")

EndFunc ;==>TogglePause

Func Terminate()

Exit 0

EndFunc ;==>Terminate

Func ShowMessage()

MsgBox(4096, "", "This is a message.")

EndFunc ;==>ShowMessage

;Exit

;brooke.ini

[section1]

;Make sure redirecting webpages are in quotes.. e.g. "www.url.com"

first_redirect = "www.cnet.com"

second_redirect = "www.cnet.com"

[section2]

;First vote does not have to come back valid for BOT to work, but it helps

;first_vote_delay in miliseconds e.g.5000 = 5 second

first_vote_delay = 2000

;scroll_page_delay in miliseconds e.g.5000 = 5 seconds

scroll_page_delay = 4000

;Times to vote times 2. e.g.1000 = 2000 votes

times_to_vote = 1000

Edited by Wisniske

Share this post


Link to post
Share on other sites

Its Flash driven so I won't be able to help like I initially thought. :)

Share this post


Link to post
Share on other sites

I am just needing to know why the

_IENavigate($oIE, $re2, 1)

isn't working any longer..

Any idea's??

Share this post


Link to post
Share on other sites

You might want to try an _IELoadWait($oIE) prior to the navigate.

If that doesn't fix it you'll need to cut it down to a much smaller reproducer.

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0