Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
JoeGlines / Decode_URL_Query.ahk
Last active April 26, 2021 15:49
Decode a URL for web scraping
;*******************************************************
; 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
!d:: ;URI Decode and Wrap on break
Send, ^c
Decoded:=URiDecode(clipboard)
StringReplace,Decoded,Decoded,?,`r`t?,All ;replace question mark with line break plus ?
StringReplace,clipboard,Decoded,&,`r`t&,All ;replace & with line break plus &
@JoeGlines
JoeGlines / Site_Catalyst_Tracking.ahk
Created July 13, 2020 11:57
Extract Pagename and Group from Site Catalyst
;~ Automate Extracting tracking codes from HTML pages
pwb:=WBGet()
text := pwb.document.documentElement.innerHTML
url:=pwb.locationURL
RegExMatch(text,"tiPageName\s?=\s?""(.*?)"";",Page_Name) ; making it greedy so it gets the last one,not the first one
StringLower,Page_Name1,Page_Name1
RegExMatch(text,"tiContentGroup\s?=\s?""(.*?)"";",Content_Group) ; making it greedy so it gets last one
StringLower,Content_Group1,Content_Group1
Clipboard:=Page_Name1 ; "`t" Content_Group1 "`t" URL
@JoeGlines
JoeGlines / Teamsite_Replace_Characters.ahk
Created July 13, 2020 12:06
Auto Replace Illegal charachters
;~ #Include <default_Settings>
;**************************************
;http://ahkscript.org/docs/commands/Transform.htm http://www.w3schools.com/charsets/ref_html_8859.asp
;~ http://www.w3schools.com/charsets/ref_html_entities_4.asp ;~ http://www.ascii.cl/htmlcodes.htm
Send ^c ;copy
Sleep, 100
Transform,Clipboard,html,%Clipboard%,3 ;3=numbered expressions used where named expression not available
;~ Clipboard:= RegExReplace(Clipboard, "mUs)&bull;\s(.*).<br>", " <ul><li>$1</li></ul>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, "mUs)&bull;\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
@JoeGlines
JoeGlines / Quick_Display_HTML.ahk
Created July 13, 2020 12:08
Quickly display HTML for a simple preview
#SingleInstance, Force
#NoEnv
SplitPath,A_ahkPath,,Root
Menu,tray,icon,%A_WinDir%\system32\netshell.dll,86
try=
(
<div style="width:75`%" id="specialNote">
<h3>Sampling</h3>
<p>To evaluate the TM4C1230, please sample the parent device: <a href="http://www.ti.com/product/tm4c1230h6pm/samplebuy">TM4C1230H6PM</a>.</p>
)
@JoeGlines
JoeGlines / Testing HTML.ahk
Created July 13, 2020 12:12
Rip a page and shove it into Excel, then verify links, etc.
#SingleInstance, Force
#NoEnv
SetBatchLines -1 ;run as fast as possible
;~ DetectHiddenWindows, On
;~ ListLines On ;on helps debug a script
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
Menu, tray, icon, B:\Progs\AutoHotKey_l\Icons\Win\ico_shell32_dll0210.ico, 1
Menu, Tray, Add, Change ID (Control + I), Change_ID
Browser_Forward::Reload
Browser_Back::
@JoeGlines
JoeGlines / ParseAHK v1.ahk
Last active April 26, 2021 15:49
Peek inside files
;*******************************************************
; 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
;*******************************************************
/*
* Line based Parser for AHK Code by just me & toralf
* some concepts taken from CoCo's ListClasses scipt (http://ahkscript.org/boards/viewtopic.php?p=43349#p42793)
* April 2015 Version 1.2 * URL: http://ahkscript.org/boards/viewtopic.php?t=7209
*/
@JoeGlines
JoeGlines / compare lists 8.ahk
Last active April 26, 2021 15:49
Compare lists of items
;*******************************************************
; 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>
;************************************************************
;~ gosub Draw_Gui
;~ Draw_Gui:
gui, font, s11 , Verdana ; Set 10-point Verdana.
@JoeGlines
JoeGlines / Compare sets.ahk
Last active April 26, 2021 15:49
Comparing two sets of items
;*******************************************************
; 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
#NoEnv
SetBatchLines -1
DetectHiddenWindows, On
gosub Display
Browser_Forward::Reload
@JoeGlines
JoeGlines / Window Hider2.ahk
Last active July 12, 2022 03:26
Hide windows from Taskbar
;*******************************************************
; 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>
;**************************************
#SingleInstance,Force ;only allow for 1 instance of this script to run
SetTitleMatchMode,2 ;2 is match anywhere in the title
^1::
@JoeGlines
JoeGlines / Active Outlook Email.ahk
Last active April 26, 2021 15:48
Various properties you can get from an Active Outlook email
;*******************************************************
; 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://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.actions
email:=ComObjActive("Outlook.Application").ActiveWindow.CurrentItem
;~ msgbox % email.senderName
;~ MsgBox % email.subject
;~ MsgBox % email.to