paradox109 Posted January 1, 2020 Posted January 1, 2020 (edited) Hello, I have A simple question about http request. What would be the fastest way to send mupltiple http request at the same time with autoit? The only way i figured out was to to start multiple processes. This way works fine but its not really a good way. What user would like to see 15 processes running in the background at the same time. I know multithread is also not available in autoit. Edited January 1, 2020 by paradox109
argumentum Posted January 1, 2020 Posted January 1, 2020 56 minutes ago, paradox109 said: What user would like to see 15 processes running in the background at the same time. a user would not "see" that. Look at a chrome browser's forks. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
moimon Posted January 1, 2020 Posted January 1, 2020 ObjCreate('WinHttp.WinHttpRequest.5.1') Mode: Async = True In Loop use: .WaitForResponse(0) That is my suggestion to you 😙
Nine Posted January 2, 2020 Posted January 2, 2020 what is your aim ? DDoS ? TheXman 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
paradox109 Posted January 2, 2020 Author Posted January 2, 2020 (edited) 11 hours ago, Nine said: what is your aim ? DDoS ? Aim is to get information faster from API's. As i said before i already have couple projects that works with multiprocessing. Edited January 2, 2020 by paradox109
paradox109 Posted January 2, 2020 Author Posted January 2, 2020 12 hours ago, moimon said: ObjCreate('WinHttp.WinHttpRequest.5.1') Mode: Async = True In Loop use: .WaitForResponse(0) That is my suggestion to you 😙 Interesting i will look it up
moimon Posted January 2, 2020 Posted January 2, 2020 Example multi request 10 pages website: Local $Thread = 10 Local $oWH[$Thread] Local $ThreadCompleted[$Thread] Local $CheckCompleted = 0 Local $AsyncMode = True For $i = 0 To $Thread - 1 $oWH[$i] = ObjCreate('WinHttp.WinHttpRequest.5.1') $oWH[$i].Open('GET', 'http://autoitvn.com/forums/thao-luan-hoi-dap/page-' & ($i + 1), $AsyncMode) $oWH[$i].Send() Next Do For $i = 0 To $Thread - 1 If $ThreadCompleted[$i] = 0 And $oWH[$i].WaitForResponse(0) = True Then ;$ThreadCompleted[$i] variable condition to prevent loop result ConsoleWrite('>Page ' & $i & ' completed:' & @CRLF & $oWH[$i].GetAllResponseHeaders & @CRLF) $ThreadCompleted[$i] = 1 $CheckCompleted += 1 EndIf Next Until $CheckCompleted = $Thread MsgBox(0, 'Hi', 'Completed') This method works very fast and do not use as much CPU and RAM resources as multi process argumentum and paradox109 1 1
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