WinHttpRequest Sending Text to Google Docs

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Humb0l
Posts: 1
Joined: 13 Aug 2022, 17:04

WinHttpRequest Sending Text to Google Docs

Post by Humb0l » 13 Aug 2022, 17:15

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?

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: WinHttpRequest Sending Text to Google Docs

Post by BoBo » 13 Aug 2022, 23:35

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

Post Reply

Return to “Ask for Help (v1)”