mary Posted March 16, 2007 Share Posted March 16, 2007 (edited) Hi ! As you know WinHttp.WinHttpRequest.5.1 is very easy to use but there is no way with autoit to do an Asynchronym call ( because AutoIT natively dont support callbacks yet) the solutions 1) co-routine ( AdlibEnable...=pseudo mutithreading) ===> bad solution (very very slowly) 2) multi-process :run 2 or more instance of you autoitscript ====> good solution but difficult to do synchronisation please an idea about a better way to do a httpget fastly (i have low bandwich 512 ko and desadvantage geographic place, other players have high speed connexion and live in the same country of the webserver site ! ) here an idea of my code While 1 $source=HTTP_get ('site/cgi') IF StringInStr($source, 'it start, go!') Then submit_form() ExitLoop EndIf wend Edited March 16, 2007 by mary Link to comment Share on other sites More sharing options...
raca Posted March 16, 2007 Share Posted March 16, 2007 Confusing post... Wanna a faster http request and asynchronym? To do in a asynchronym way i suggest to make a secundary file.au3 that takes the url has a argument and you would be like this $site1 = run("file.au3 http://site.org", $somedir, $STDOUT_CHILD) StdoutRead($site1) No idea to do it faster... Cheers Link to comment Share on other sites More sharing options...
mary Posted March 16, 2007 Author Share Posted March 16, 2007 (edited) Confusing post... Wanna a faster http request and asynchronym? To do in a asynchronym way i suggest to make a secundary file.au3 that takes the url has a argument and you would be like this $site1 = run("file.au3 http://site.org", $somedir, $STDOUT_CHILD) StdoutRead($site1) No idea to do it faster... Cheers sorry for confusing ( i'm doing all my best but my english is very poor : ( ) I mean by asynchronym httprequest ( look in winhttp MSDK) this: $WinHttpReq = ObjCreate("WinHttp.WinHttpRequest.5.1") WinHttpReq.Open("GET", $s_URL, true) ; true = asynchronym call $WinHttpReq.Send() ; here you have to wait for reponse, so you can lanch an other thread or an other httprequest (impossible with autoit to handle a callback) Edited March 16, 2007 by mary 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