Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
JoeGlines / Builtin_Variables.ahk
Created June 1, 2020 23:14
Just some of the cool built-in variables
;~ #Include <default_Settings>
;**Built in variables https://www.autohotkey.com/docs/Variables.htm#BuiltIn ***
:o:vcn.::
Send % A_ComputerName ;Sends computer name
return
:o:vun.::
send % A_UserName
return
@JoeGlines
JoeGlines / First_to_Last.ahk
Created June 1, 2020 23:48
Get the text of the First selected item and the Last selected item
Get the text of the First selected item and the Last selected item
@JoeGlines
JoeGlines / copy.ahk
Created June 14, 2020 14:31
just code
LastMon:=GetLastMonday()
;********************Start script- get location***********************************
Ref:=GetXLInfo() ;Gets called first to get where you are In Excel and pull the Location
SearchAS400(LastMon,Ref.Location_Digits,Ref.ProductID) ;Get the data from AS400
PushToXL(Ref) ;Shove data back into Excel
return
;********************Get where you are in Excel to use later***********************************
GetXLInfo(){
XL:=XL_Handle(1)
XLData:=[] ;create Arra to hold the variou data points
@JoeGlines
JoeGlines / Pdf to text.ahk
Created June 14, 2020 20:17
convert PDF to different formats
File_path:="C:\Users\Joe\DropBox\Progs\AutoHotkey_L\AHK Work\PDF\pdftotext\LUM00700060_06082018.pdf"
;~ File_path:="B:\Progs\AutoHotkey_L\AHK Work\PDF\example PDfs\Carrollton_4.pdf"
;~ File_path:="B:\Progs\AutoHotkey_L\AHK Work\PDF\example PDfs\coppell.pdf"
Type:="xml" ;"txt2" ;
;~ Type:="txt2" ;
run:="1"
Convert_PDF(File_Path,Type,Run=1)
return
@JoeGlines
JoeGlines / CSS_SurveyGizmo_Matrix_Tables.css
Created July 12, 2020 16:26
CSS for right alignment, color coding and Table widths in SurveyGizmo
/* Write your custom CSS here */
/* !----- Custom Table Settings ----- */
/* !----- Sets all columns to same width----- */
table {
border: 1px solid black;
table-layout: fixed;
width: 850px;
}
/*Sets the width of ANSWERS on all tables*/
@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 / UniqueIDs.ahk
Created October 19, 2020 19:32
Getting Unique IDs on User's computers
#SingleInstance Force
str := "`nProcessorId`t" . Get_ProcessorId()
str .= "`nSerialNumber`t" . Get_MotherboardSerialNumber()
str .= "`nMACAddress`t" . Get_MACAddress()
MsgBox, 4, , %str%`n`nCopy this to your Clipboard?
IfMsgBox, No
return
Clipboard := str