Jump to content

Adding +1 to a URL on page load


Recommended Posts

Hi.

I'm working with an searchscript and need it to add +1 to a number in a url every x sec..

How can i do this?

For example:

http://www.example.com/userid=1&list=all

I want AutoIt to go to userid 2, 3, 4, 5, 6 +++ after the previous page loaded.

So when http://www.example.com/userid=1&list=all loaded, i want it to go to http://www.example.com/userid=2&list=all and so on..

Link to comment
Share on other sites

Sorry for saying, but this sounds very dubious to me.

Perhaps you can add an explanation of a valid reason for this?

Of course you dont have to, Im just asking ?

I need to find a user with a specified profile text, and therefore i want to search all the userpages (around 300 users)

Link to comment
Share on other sites

Something like this?

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

For $i = 1 To 300
    Local $hDownload = InetGet("http://www.example.com/userid=" & $i & "&list=all", @ScriptDir & "\UserID_" & $i & ".html", 1, 1)
    Do
        Sleep(250)
    Until InetGetInfo($hDownload, 2)
    Local $nBytes = InetGetInfo($hDownload, 0)
    InetClose($hDownload)
    ConsoleWrite("Page saved: " & @ScriptDir & "\UserID_" & $i & ".html" & @TAB & "Bytes written: " & $nBytes & @CRLF)
Next

Func _Exit()
    Exit
EndFunc   ;==>_Exit
Link to comment
Share on other sites

Something like this?

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

For $i = 1 To 300
    Local $hDownload = InetGet("http://www.example.com/userid=" & $i & "&list=all", @ScriptDir & "\UserID_" & $i & ".html", 1, 1)
    Do
        Sleep(250)
    Until InetGetInfo($hDownload, 2)
    Local $nBytes = InetGetInfo($hDownload, 0)
    InetClose($hDownload)
    ConsoleWrite("Page saved: " & @ScriptDir & "\UserID_" & $i & ".html" & @TAB & "Bytes written: " & $nBytes & @CRLF)
Next

Func _Exit()
    Exit
EndFunc   ;==>_Exit

It should only goto the page, not save local UserID_*.html files. Need this to be as simple as possible. Also, it would be nice to see the IE-window when its working.
Link to comment
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
 Share

  • Recently Browsing   0 members

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