Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
JoeGlines / Clean up name from path.ahk
Last active April 26, 2021 15:47
Simplify and clean-up the name from the file path
;*******************************************************
; 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>
;**************************************
SplitPath, Clipboard,,,,name
RegExMatch(name,"(.*\d)_(.*)",myname)
string:=myname1 A_Space StrReplace(myname2,"_"," ")
Sleep, 50
@JoeGlines
JoeGlines / Microsoft_Zoom_In_Out_4000_Keyboard.ahk
Created October 19, 2020 12:38
Configure the Zoom key to do a page up / page down
;~ https://autohotkey.com/board/topic/36304-hidextended-input-devices-ms-natural-keyboard-4000-etc/page-2
; Capture input from the "Zoom" slider on the Natural Keyboard 4000 and use it to scroll up and scroll down
; The HID top level collection for the Natural Keyboard 4000 is:; Usage 1 ; Usage Page 12
;~ #NoTrayIcon
#SingleInstance force ; Replace any previous instance
DetectHiddenWindows, on
OnMessage(0x00FF, "InputMessage")
SizeofRawInputDeviceList := 8, SizeofRidDeviceInfo := 32, RIM_TYPEMOUSE := 0, RIM_TYPEKEYBOARD := 1, RIM_TYPEHID := 2, RIDI_DEVICENAME := 0x20000007
RIDI_DEVICEINFO := 0x2000000b, RIDEV_INPUTSINK := 0x00000100, RID_INPUT := 0x10000003, Usage := 1, UsagePage := 12
@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
@JoeGlines
JoeGlines / Google_Search_with GUI.ahk
Created October 23, 2020 15:05
Adding a GUI to my search tool
;**************************************
;~ gui,+AlwaysOnTop
gui, font, S12 ;Change font size to 12
Gui, Add, GroupBox, x0 w460 h150, Search ;add a groupbox
gui, Add, Checkbox, x20 y30 checked1 vahk, AutoHotkey.com ;first checkbox and move down / over a bit
gui, Add, Checkbox, checked0 vstack, StackOverflow.com
gui, Add, Checkbox, checked1 vstackAHK, StackOverflow.com/AutoHotkey
gui, Add, Checkbox, checked0 vMicro,Microsoft.com
gui, Add, Checkbox, checked0 vTech,TechOntheNet.com
gui, Add, Text, x10 y+20, Search for:
@JoeGlines
JoeGlines / Original Google search.ahk
Created October 23, 2020 15:06
Before learning how easy GUIs are with AutoHotkey
InputBox, Search, Search sites with Google:,,,700, 100
if (Search= "") or (Error = 1)
return
Run, chrome.exe "http://www.google.com/search?q=%Search%+site:stackoverflow.com"
Run, chrome.exe "http://www.google.com/search?q=%Search%+site:https://stackoverflow.com/questions/tagged/autohotkey"
Run, chrome.exe "http://www.google.com/search?q=%Search%+site:autohotkey.com"
return
;*******************************************************
; 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
;*******************************************************
;~ ;******Wrap Right align*************.
^!w:: ; Wraps selected text in right align
Store:=Clipboard_Backup_Copy_Selected_Text()
ClipBoard:=StrReplace(Clipboard,"`n","`n<p style='text-align:right'>") ;prepend
Clipboard:=StrReplace(Clipboard,"`r","</p>`r") ;postpend
Clipboard := "<p style='text-align:right'>" Clipboard "</p>" ; wrap with comments tag
;*******************************************************
; 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
;*******************************************************
;**************************************
OldString:="udeGU"
NewString:="nws"
;*******************************************************
;~ doc.ActiveDocument.Hyperlinks.Add(oWord.Selection.Range, Address,"","",TextToDisplay) ;what I started from
doc:=ComObjActive("Word.Application") ;Connect to open Word file
@JoeGlines
JoeGlines / Search - Replace MS Word Links.ahk
Last active April 26, 2021 15:46
Automate searching and replacing hyperlinks in MS Word
@JoeGlines
JoeGlines / Working with Word Links.ahk
Last active April 26, 2021 15:46
Search and replace links in MS Word
;*******************************************************
; 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
Constant:="90" ;Change this to a number you want
;********************What do you want to Encode?***********************************
InputBox, Pass, Encode,What do you wish to encode?,,600,130
Clipboard:=Encoded:=Encrypt(Pass,Constant)
InputBox, PlaceHolder, Encoded Value, % "Here is the encoded value", ,600,130,,,,,%Encoded%