Geethu Posted April 24, 2014 Share Posted April 24, 2014 When I use the code : $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", $requestUrl, False) $oHTTP.Send() If $oHTTP.Status = 200 Then Return $oHTTP.ResponseText EndIf I got an error. "Variable used without being declared." $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ^ ERROR I don't know what's wrong with this.. Link to comment Share on other sites More sharing options...
Danp2 Posted April 24, 2014 Share Posted April 24, 2014 Does it work if you declare the variable by adding the "Local" keyword at the beginning of the line. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Solution trancexx Posted April 24, 2014 Solution Share Posted April 24, 2014 There is nothing wrong with the code you posted. What could be a problem is that's not the whole code you run and the part that you haven't posted has MustDeclareVars option activated. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Geethu Posted April 25, 2014 Author Share Posted April 25, 2014 There is nothing wrong with the code you posted. What could be a problem is that's not the whole code you run and the part that you haven't posted has MustDeclareVars option activated. Thank you very much trancexx. Its working fine. 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