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
Browser_Forward::Reload ;RControl::
Browser_Back::
;************************************************************
pwb := WBGet()
;~ MsgBox % pwb.LocationURL
#SingleInstance, Force
;*******************************************************
; 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::
;************************************************************
pwb := WBGet()
;*******************************************************
; 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
;*******************************************************
shift := []
Loop 10 {
shift.Push(A_Index - 1)
}
@JoeGlines
JoeGlines / WindowSnipping_BK.ahk
Last active December 8, 2023 22:54
Window Snipping with Opacity
;*******************************************************
; 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
;*******************************************************
;Added a GUI for Transparency. 4/13/21 ~BK
; Could also modify directly in the original code by adjusting Alpha from 0-255
; I'm having trouble getting the new Transparency GUI to save the varaible
; Also, cannot seem to make a variable work instead of the Alpha number
; Only modified the OpacityMenu in the GUI & the OpacityGUI at the end
#NoEnv
;*******************************************************
; 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
;*******************************************************
!d:: ;Wrap on break
Clipboard_Backup_Copy_Selected_Text()
Decoded:=URiDecode(clipboard)
StringReplace,Decoded,Decoded,?,`r`t?,All
StringReplace,Decoded,Decoded,&,`r`t&,All
clipboard:=Decoded
;*******************************************************
; 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
;*******************************************************
gosub Store_Clipboard_Copy_Selected_Text
;http://ahkscript.org/docs/commands/Transform.htm http://www.w3schools.com/charsets/ref_html_8859.asp
Transform,Clipboard,html,%Clipboard%,3 ;3=numbered expressions used where named expression not available
Clipboard:= RegExReplace(Clipboard, "mUs)•\s(.*).<br>", " <li>$1</li>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, " <li>(.*)</li>", " <ul>`r`n <li>$1</li>`r`n </ul>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, "mUs).<br>", "<br>") ;convert bullet & br to ul
;*******************************************************
; 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 ;Remember to put Chrome in your library folder
;**************************************
;~ page:=Chrome.GetPage() ;Connects to page, but not a specific one
;~ page :=Chrome.GetPageByTitle("Joe","startswith") ;This will connect to a specific tab
page:=Chrome.GetPageByTitle("Joe","startswith",2) ;This will connect to the second index of a specific tab
;*******************************************************
; 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
;*******************************************************
; Original post from rodfell Oct 2007 https://autohotkey.com/board/topic/41463-simple-dual-monitor-window-switch/
;***********adjust next two lines to the monitors you wish to toggle between*******************
SysGet, Mon1, Monitor, 1 ; Grab monitor number 1 create a Mon1 var
sysGet, Mon2, Monitor, 2 ; Grab monitor number 2 create a Mon2 var
;make sure you place the two above monitor lines at top of script
;************************Toggle between monitors*******************************.
;*******************************************************
; 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"
;*******************************************************
; 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
;*******************************************************
Text:="|&lt;YouTube Skip Ads&gt;*89$62.zzzzzzzzzzy7btzzyTyTzStyTzzbzbzbaTzzzkztztzb9cTwDUQDTtiNnzPnaNlyHaQzaRtjT7VtbjtbSNzyMSNvyxrb3zqHaSz0BtyNxatbDrvSPrSNaNnxynaRsCQa1yTa5kzzzzbzzzzzzzzztzzzzzzzzzyTzzzzzs"
loop { ;keep looping over
Sleep,500 ;sleep for 1/2 a second
ok:=FindText(0,0,150000,150000,0,0,Text) ;See if can find the image
if Ok ;if it is found, do the next line
FindText_Control_Click(Ok,X_Adj:=0,Y_Adj:=0,ahkEXE:="chrome.exe") ;Send control click to the position (note, doesn't move mouse)