ZimperZ Posted October 3, 2010 Share Posted October 3, 2010 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 More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 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 ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ZimperZ Posted October 3, 2010 Author Share Posted October 3, 2010 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 More sharing options...
KaFu Posted October 3, 2010 Share Posted October 3, 2010 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 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
ZimperZ Posted October 3, 2010 Author Share Posted October 3, 2010 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 More sharing options...
whim Posted October 3, 2010 Share Posted October 3, 2010 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now