Last active
April 26, 2021 15:53
-
-
Save JoeGlines/82c1b1d9d8b044a8559cf09167fefc59 to your computer and use it in GitHub Desktop.
Handling Event Listeners & Custm edit boxes
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 | |
;******************************************************* | |
#SingleInstance,Force | |
#Include | |
;************************************** | |
page:=Chrome.GetPageByURL("http://www.gethifi.com/tools/regex","startswith") ;This will connect to the second index of a specific tab | |
If !IsObject(page){ | |
MsgBox % "That wasn' t object / the page wasn't found" | |
ExitApp | |
} | |
document.querySelector("#regex").click() | |
js= | |
( | |
document.querySelector("#regex").value = '.' | |
document.querySelector("#regex").dispatchEvent(new MouseEvent("mouseup")) | |
) | |
js= | |
( | |
document.querySelector("#regex").value = '.' | |
document.querySelector("#regex").dispatchEvent(new KeyboardEvent("keyup")) | |
) | |
js= | |
( | |
document.querySelector("#regex").value = '.' | |
document.querySelector("#regex").dispatchEvent(new Event("change")) | |
) | |
;~ page.Evaluate(js) | |
;********************Second page*********************************** | |
page:=Chrome.GetPageByURL("https://regex101.com/","startswith") ;This will connect to the second index of a specific tab | |
If !IsObject(page){ | |
MsgBox % "That wasn' t object / the page wasn't found" | |
ExitApp | |
} | |
somevar = he"l'lo | |
escaped:=Chrome.Jxon_Dump(somevar) | |
MsgBox % escaped | |
js= | |
( | |
document.querySelector('.CodeMirror').CodeMirror.setValue(%escaped%) | |
) | |
page.Evaluate(js) | |
ExitApp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment