Page 1 of 1

WinHttpRequest Sending Text to Google Docs

Posted: 13 Aug 2022, 17:15
by Humb0l
Hey so I'm trying to send text strings to a shared google doc link using the WinHttpRequest without having to pull up an active browser window, but I do not think anything is being sent through my code.

Code: Select all

http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
http.open( "POST", "https://docs.google.com/document/d/1dzxQKVdIpQDoL3MaNk2aAQ2hjGg1i8CR4g3woIm0bRY/edit?usp=sharing", False)
http.send("Type Me")
;http.WaitForResponse(-1)
Could someone chime in?

Re: WinHttpRequest Sending Text to Google Docs

Posted: 13 Aug 2022, 23:35
by BoBo
Welcome to this Autohotkey forum.
AFAIK, Google is using OAuth2 for its API, so you have to provide the respective authentication details to access whatever content on Google Drive.
OTOH, adding content to an existing browser session needs to put the focus back onto it AKA activating its window.

viewtopic.php?f=22&t=29165