Sign in to follow this  
Followers 0
mary

Need advice for faster way

3 posts in this topic

#1 ·  Posted (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 ! :whistle:)

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 by mary

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by mary

Share this post


Link to post
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
Sign in to follow this  
Followers 0