Skip to content

Instantly share code, notes, and snippets.

;*******************************************************
; 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
pwb := WBGet() ;Get handle to IE Page
Tab:=pwb.document.getElementsbyClassName("t1tease")[0].getElementsbyTagName("Table")[1] ;Create an "alias" to the table
Loop, % Tab.getElementsbyTagName("TR").length { ;loop over each row
Row:=Tab.getElementsbyTagName("TR")[A_Index+1] ;create an alias for the current row
;*******************************************************
; 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
;~ CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window.
;~ Supported Image filetypes are GIF, JPG, ICO, CUR, ANI and BMP images that are 16bit+
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, B:\Progs\AutoHotkey_L\Icons\Alpha\B.ico
if (ErrorLevel = 2)
MsgBox % "Could not conduct the search.`n`nThe SOURCE image does not exist"
;*******************************************************
; 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
;~ https://autohotkey.com/docs/Scripts.htm#continuation ;scroll down after loading page
;***********Join***Text Expander****************
/*
`s Space `r`n=CR+LF |=pipe
;*******************************************************
; 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
;*******************************************************
Browser_Forward::Reload
Browser_Back::
str:="my example string"
s:=StrSplit(str," ") ;Create an Array in "s" parsing on spaces
myVar:= s.1 ;Access the first item in the Array
;*******************************************************
; 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 <default_Settings>
RAlt::
Browser_Forward::Reload
RControl::
Browser_Back::
;************************************************************
:o:tac.::http://the-automator.com
:o:tst.::{#}Include &lt;default_Settings&gt;`rRAlt`::`nBrowser_Forward`::Reload`r`nRControl`::`nBrowser_Back`::`r`;{* 60}`r`n
; 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
;********************Copy selected text, activiate Excel &amp; Paste****************
;***********Copy / Paste to other program
^b::
backup:=ClipboardAll ;create a backup of the clipboard
Clipboard:="" ;clear the clipboard
Send, ^c ;Send "Control C" to copy selected text
ClipWait,1 ;waiting for clipboard to have data
;~ MsgBox % Clipboard ;Show the clipboard has data
;*******************************************************
; 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
;*******************************************************
;************Hotkeys********************
; ^=Control #=Windows +=Shift !=Alt
^b::Run C:\Program Files\Mozilla Firefox\firefox.exe ;Launches FireFox
^n::run notepad.exe ;Launches Notepad
~^n::run notepad.exe ;launches Notepad w/o absorbing the HotKey</pre>
<h3>HotString</h3>
;*******************************************************
; 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
;*******************************************************
pwb := WBGet()
MsgBox % IsObject(pwb)
MsgBox % pwb.LocationURL
MsgBox % Var:=pwb.document.GetElementsByTagName("Input")[0].Value ;Get value
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].Value ;Don't use this- it doesn't pull back anything helpfu
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].OuterHTML ;Get InnerText
;*******************************************************
; 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
;*******************************************************
pwb := ComObjCreate("InternetExplorer.Application") ;create IE Object
pwb.visible:=True ; Set the IE object to visible
pwb.Navigate("https://www.facebook.com/login.php") ;Navigate to URL
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
Sleep, 100