Changed HTTP communication to use IWinHttpRequest directly so it might be easier to accomplish #57
Removed not required #includes from main.au3
This commit is contained in:
parent
56172306d5
commit
9bab53de84
|
@ -14,7 +14,7 @@
|
|||
|
||||
;#AutoIt3Wrapper_Res_ProductVersion=x.x.x.x ; Broken, use #AutoIt3Wrapper_Res_Field=ProductVersion|x.x.x as workarround.
|
||||
#AutoIt3Wrapper_Res_Field=ProductVersion|Freeware
|
||||
#AutoIt3Wrapper_Res_Fileversion=1.1.1.79
|
||||
#AutoIt3Wrapper_Res_Fileversion=1.1.1.80
|
||||
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=N ;(Y/N/P) AutoIncrement FileVersion After Aut2EXE is finished. default=N. P=Prompt, Will ask at Compilation time if you want to increase the versionnumber
|
||||
#AutoIt3Wrapper_Res_Language=1033 ;Resource Language code . german = 1031, english (U.S.) = 1033. default 2057=English (United Kingdom). For a List see http://technet.microsoft.com/en-us/library/dd346950.aspx
|
||||
|
||||
|
|
|
@ -2,14 +2,19 @@
|
|||
|
||||
;; SMAC XML APi
|
||||
Func lookupSteamId($input)
|
||||
HttpSetUserAgent("SMACheck/" & FileGetVersion(@ScriptName, "FileVersion"))
|
||||
Local $oXML = InetRead("http://api.spiffytek.com/pub/smacheck/steamid/" & $input, 19)
|
||||
Local $agent = "SMACheck/" & FileGetVersion(@ScriptName, "FileVersion")
|
||||
Local $oXML = ObjCreate("winhttp.winhttprequest.5.1")
|
||||
$oXML.Open("GET", "http://api.spiffytek.com/pub/smacheck/steamid/" & $input, False)
|
||||
$oXML.SetTimeouts(30000,30000,30000,30000)
|
||||
$oXML.SetRequestHeader("User-Agent", $agent)
|
||||
$oXML.Send()
|
||||
$oXML = $oXML.ResponseText
|
||||
If @error <> 0 Then
|
||||
_printError("noapi")
|
||||
Return "ERROR_HANDELED"
|
||||
EndIf
|
||||
|
||||
$oXML = _XMLLoadXML(BinaryToString($oXML, 4))
|
||||
$oXML = _XMLLoadXML($oXML)
|
||||
If @error <> 0 Then
|
||||
_printError("noapi")
|
||||
Return "ERROR_HANDELED"
|
||||
|
|
Reference in New Issue