Skip to content

Instantly share code, notes, and snippets.

@davebrny
davebrny / change case.ahk
Created December 28, 2016 08:44
(autohotkey) - change the case of selected text
!u::goSub, set_upper_case
!l::goSub, set_lower_case
!t::goSub, set_title_case
set_upper_case:
set_lower_case:
set_title_case:
revert_clipboard := clipboardAll
@davebrny
davebrny / i.mage.ahk
Last active July 27, 2023 16:25
🧙‍♂️ (autohotkey) - one click image download
/*
[hotkeys]
!p = C:\Users\%a_userName%\Pictures\.i.mages
[browser]
ahk_exe chrome.exe
ahk_exe firefox.exe
ahk_exe iexplore.exe
ahk_exe vivaldi.exe
@davebrny
davebrny / tiny clipboard.ahk
Last active July 27, 2023 16:24
📋 (autohotkey) - microscopic clipboard manager (text only)
#noEnv
#singleInstance, force
history := []
history_total = 20
truncate = 65
return ; end of auto-execute
$^c:: ; add to clipboard history
@davebrny
davebrny / clipboard.ahk
Last active July 27, 2023 16:23
(autohotkey) - one line clipboard commands
clipboard(string="") {
static clipboard_r
if (string = "/save")
clipboard_r := clipboardAll
else if (string = "/restore")
{
clipboard := clipboard_r
clipboard_r := ""
}
@davebrny
davebrny / reloadr.ahk
Last active April 15, 2023 20:29
🚚 (autohotkey) - reload running scripts from a context menu
/*
[script info]
version = 0.8
description = reload running scripts from a context menu
author = davebrny
source = https://gist.github.com/davebrny/4f14e1edb4fac2fc2459c3d87fa537f7
[settings]
hotkey_menu = ^+`
hotkey_default = ^`
@davebrny
davebrny / google search time range.ahk
Last active April 2, 2023 04:05
(autohotkey) - switch between the various time ranges (hour, day, week, month, year) 🔎
#if WinActive("ahk_class Chrome_WidgetWin_1", , "ahk_class #32770")
or WinActive("ahk_class MozillaWindowClass", , "ahk_class #32770")
^+l::goSub, google_time_range
#if
google_time_range:
@davebrny
davebrny / script_icon.ahk
Last active March 2, 2023 21:38
🖼️ (autohotkey) - automagically find an icon for a script
/*
[icon folders]
folder_1 =
folder_2 =
*/
script_icon(ahk_filepath="") {
if (ahk_filepath = "")
{
icon_name := subStr(a_scriptName, 1, strLen(a_scriptName) - 4)
@davebrny
davebrny / auto_include.ahk
Last active January 19, 2023 03:10
📃 (autohotkey) - create a list of .ahk files to be #included in your main script
/*
[search folders]
folder_1 =
folder_2 =
[ignore paths]
C:\Users\documents\scripts\example script name.ahk
C:\Users\documents\scripts\example folder name
[settings]
@davebrny
davebrny / ordinal.ahk
Last active August 10, 2022 20:12
(autohotkey) - add an ordinal suffix to a number: 1st, 2nd, 3rd
ordinal(number) {
stringRight, last_digit, number, 1
stringRight, last_two , number, 2
if (last_digit = 1)
suffix := "st"
else if (last_digit = 2)
suffix := "nd"
else if (last_digit = 3)
suffix := "rd"
@davebrny
davebrny / python_termux.tsk.xml
Created June 13, 2022 22:58
(tasker) a task that runs the termux plugin and termux-relay.py
<TaskerData sr="" dvi="1" tv="5.15.14">
<Task sr="task775">
<cdate>1653984629316</cdate>
<edate>1655136097308</edate>
<id>775</id>
<nme>python termux &gt;</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>547</code>
<label>set par1</label>