Jump to content
hugmax

Open Web page, process links, refresh and process again.

Recommended Posts

hugmax

I am trying to do an autosurf script

$oIE1 = _IECreate("http://visitasgratis.es/webs/p.php?p=surf")
$hwnd1 = _IEPropertyGet($oIE1, "hwnd")
WinSetState($hwnd1, "", @SW_MAXIMIZE)
_IEAction($oIE1, "visible")
_IELoadWait($oIE1)


Sleep(3000)

While 1
Local $oLinks = _IETagNameGetCollection($oIE1, "a")

    For $oLink In $oLinks-1
        $class_value = $oLink.GetAttribute("class")
        If string($class_value) = "followbutton" Then
            function1($oLink)
        EndIf
    Next
    MsgBox($MB_SYSTEMMODAL, "Title", "Number of links." & $oLinks , 5)
    Sleep(30000)

    Local $oIE = _IEAttach($hwnd1)
    _IEAction($oIE, 'refresh')
WEnd    

 

When all links are processed, I want to refresh the page and get all the new links.


 

 

Share this post


Link to post
Share on other sites
alien4u

You don't need to attach, once you finish processing your links you:

 

_IENavigate($oIE, "http://visitasgratis.es/webs/p.php?p=surf")

Or you could also do this:
 

_IEAction($oIE, "refresh")

 

Share this post


Link to post
Share on other sites
hugmax

I am getting this error now.

$class_value = $oLink^ ERROR

The requested action with this object has failed.

How to check if $oLink is not empty?

 

Share this post


Link to post
Share on other sites
hugmax

Autosurf web pages. 

from a list.

is it against the forum rules? because I dont want to brake any rules. I am using google for all the my other questions.

 

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

×