Skip to content

Instantly share code, notes, and snippets.

@db93n2
db93n2 / lightshot enter.ahk
Created January 27, 2017 09:14
(autohotkey) - use the enter key in lightshot to save a screenshot to the last used folder
#ifWinActive ahk_exe Lightshot.exe
enter::
winGetTitle, window_title, ahk_exe Lightshot.exe
if inStr(window_title, "save")
send {enter}
else send ^{s}
return
#ifWinActive
@db93n2
db93n2 / davebrny.ini
Created January 28, 2017 18:09
my key list for long press.ahk - (https://github.com/davebrny/long-press) (autohotkey)
[long press]
1 = {!}
2 = {"}
3 = {U+20AC} ; € euro symbol
4 = {$}
5 = {%}
6 = {^}
7 = {&}
8 = {*}
9 = {(}
@db93n2
db93n2 / linker.ahk
Last active April 14, 2020 06:46
(autohotkey) - generate a html/markdown/bbcode link from the clipboard or selected text
^![::linker("markdown")
^!,::linker("html")
^!/::linker("bbcode")
linker(link_type) {
revert_clipboard := clipboardAll
1st_clipboard := trim(clipboard)
clipboard := ""
@db93n2
db93n2 / list_vars.ahk
Last active February 26, 2018 18:17
🐛 (autohotkey) - list the variables in the current file or label/hotkey/function
/*
[script info]
version = 1.6.1
description = list the variables in the current file or label/hotkey/function
ahk version = 1.1.24.04
author = davebrny
source = https://gist.github.com/davebrny/d5cf686619a3402f1426277a3359521d
*/
list_vars(path, extra, scope="", ignore_vars="") {
@db93n2
db93n2 / .sublime snippets.md
Last active November 13, 2017 18:35
sublime text snippets for some of my autohotkey scripts
@db93n2
db93n2 / timer.ahk
Last active February 12, 2017 22:50
(autohotkey) - a_tickCount or "QueryPerformanceCounter" timer
timer_start(name="a"){
global
stringReplace, name, name, % a_space, _, all
start_tick_%name% := a_tickCount
dllCall("QueryPerformanceCounter", "Int64*", start_qpc_%name%)
}
@db93n2
db93n2 / compile.ahk
Last active July 23, 2020 16:34
📦 (autohotkey) - compile an .ahk file to .exe
;# compile file(s) passed to this script
path_total = %0%
loop, % path_total
{
ahk_path := %a_index% ; get cmd line parameters
if inStr(ahk_path, "~") ; if drag & drop was used
{
loop %ahk_path%, 1 ; convert from short path
ahk_path := a_loopFileLongPath
}
@db93n2
db93n2 / 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)
@db93n2
db93n2 / tiny clipboard.ahk
Last active August 22, 2024 05: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
@db93n2
db93n2 / dynaclip.ahk
Last active February 15, 2022 14:00
(autohotkey) - basic web clipper for https://dynalist.io
/*
[script info]
version = 0.4
description = basic web clipper for dynalist.io
author = davebrny
source = https://gist.github.com/davebrny/a23080af7aa3a648c5ce54fb61362416
*/
#noEnv
#persistent