Last active
April 26, 2021 15:51
-
-
Save JoeGlines/c0e5ec38fb23b58890b0fe30366cf7ca to your computer and use it in GitHub Desktop.
Example using the Msxml2 Com object for an API Request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
;***********msXML2 XMLHttp Request XHR https://en.wikipedia.org/wiki/XMLHttpRequest******************* | |
XHR:=ComObjCreate("Msxml2.XMLHTTP") ;https://msdn.microsoft.com/en-us/library/ms535874(v=vs.85).aspx | |
;open parameters( Method, URL, Asynchronous, UserName, Password ) | |
XHR.Open("GET","https://www.autohotkey.com/boards/memberlist.php?mode=viewprofile&u=114",False) | |
XHR.Send() | |
while(XHR.ReadyState!=4) ;Wait for it to complete | |
Sleep,50 | |
DisplayHTML(XHR.ResponseText,1400,1000) | |
DisplayHTML(HTML,w=300,h=400){ | |
static wb | |
gui,margin,0,0 | |
gui, Add, ActiveX, x0 y0 w%w% h%h% vWB, shell explorer | |
wb.Silent:=True | |
wb.Navigate("about:blank") | |
wb.document.write(HTML) | |
gui, Show, , HTML returned | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment