hugmax

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

7 posts in this topic

#1 ·  Posted

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



#2 ·  Posted

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

#3 ·  Posted

This appears to be some form of affiliate / advertising site. What is the purpose of this script?

Share this post


Link to post
Share on other sites

#4 ·  Posted

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

#6 ·  Posted

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

#7 ·  Posted

The question remain why you would want to autosurf these pages as I really do not understand why one would want this?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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