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
;********************Copy selected text, activiate Excel & 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
;*******************************************************
; 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)&amp;bull;\s(.*).&lt;br&gt;", " &lt;li&gt;$1&lt;/li&gt;") ;convert bullet &amp; br to ul
Clipboard:= RegExReplace(Clipboard, " &lt;li&gt;(.*)&lt;/li&gt;", " &lt;ul&gt;`r`n &lt;li&gt;$1&lt;/li&gt;`r`n &lt;/ul&gt;") ;convert bullet &amp; br to ul
Clipboard:= RegExReplace(Clipboard, "mUs).&lt;br&gt;", "&lt;br&gt;") ;convert bullet &amp; br to ul