Jump to content

Recommended Posts

Posted

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..

Posted

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)

Posted

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
Posted

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.
Posted

Need this to be as simple as possible

OK - replace the For..Next in KaFu's code with this (make sure to set $waiting_time_in_sec to desired value first)

For $i = 1 To 300
    Local $url = "http://www.example.com/userid=" & $i & "&list=all"
    ShellExecute($url) ; open page in default browser
    Sleep($waiting_time_in_sec * 1000)
Next

whim

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
×
×
  • Create New...