bobetko Posted November 13, 2007 Posted November 13, 2007 (edited) I need to make http request to this page:(I also have to send parameters q, output, key)http://maps.google.com/maps/geo?q=some+address,City,State&output=csv&key=MyGoogleKeyand be able to process result which is longitude and latitude separated with comma.How do I do this with AutoIt 3.0After some resarch I have this:$ResolveTimeout = 5000 $ConnectTimeout = 5000 $SendTimeout = 5000 $ReceiveTimeout = 5000 $sUrl = "http://maps.google.com/maps/geo" $PostData = "q=4400+Horizon+Hill,San+Antonio,TX&output=csv&key=MyGoogleKey" $oHttpRequest = ObjCreate("MSXML2.ServerXMLHTTP") $oHttpRequest.Open ("POST", $sUrl,True) ;$oHttpRequest.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded"); Need to change as per your webpage $oHttpRequest.setRequestHeader ("Content-Type", "text/plain"); $oHttpRequest.setRequestHeader ("Connection", "Keep-Alive") $oHttpRequest.Send ($PostData) sleep(1000) $strReturn = $oHttpRequest.responseText MsgBox(4096, "Done", $strReturn);But I am not getting proper response. Getting something, but now two numbers, latitude and longitude.What I am doing wrong?Thanks. Edited November 13, 2007 by bobetko
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