Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active April 26, 2021 15:32
Show Gist options
  • Save JoeGlines/28aa1f56402807772b1ddcaca1efa50c to your computer and use it in GitHub Desktop.
Save JoeGlines/28aa1f56402807772b1ddcaca1efa50c to your computer and use it in GitHub Desktop.
;*******************************************************
; 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
;*******************************************************
#Include <Chrome> ;Remember to put Chrome in your library folder
#SingleInstance,Force
;**************************************
page:=Chrome.GetPageByTitle("Joe","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
}
page.Call("Page.navigate",{"url":"https://p.ahkscript.org/"}) ;Navigates to page
page.WaitForLoad() ;Wait for page to load
page:=Chrome.GetPageByTitle("ahkbin!","startswith") ;This will connect to the second index of a specific tab
;~ page:=chrome.GetPage()
;~ page.Evaluate("editor.insert('hello world')")
;~ page.Evaluate("document.querySelector('body &gt; textarea').value ='taco'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment