How can I change code codemirror text in github gist with autohotkey?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
my-lord
Posts: 45
Joined: 01 Apr 2018, 15:12

How can I change code codemirror text in github gist with autohotkey?

06 May 2018, 17:21

Hello guys. I am trying to write hotkey script that copy selected code and create GitHub gist and copy embedded script.
I want to do this on chrome browser. But I cannot change the codemirror text.
Here is what I have tried so far:

Code: Select all

^+g:: 
Send ^c
ChromeInst := new Chrome("ChromeProfile", "https://example.com", "--headless")
ChromeInst.Call("Page.navigate", {"url": "https://gist.github.com/"})
ChromeInst.WaitForLoad()
ChromeInst.getElementsByClassName("CodeMirror cm-s-github-light").innerHtml=Clipboard
ChromeInst.getElementsByClassName("btn-secret")[0].Click()
ChromeInst.WaitForLoad("")
Clipboard := PageInst.getElementsByClassName("js-url-field")[0].value
Send, ^v
Return
How can I do this?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: downstairs, filipemb, OrangeCat and 173 guests