Skip to content

Instantly share code, notes, and snippets.

@db93n2
db93n2 / youtube hotkeys for vlc.ahk
Last active February 12, 2017 21:10
(autohotkey) - vlc hotkeys remapped to match youtube's hotkeys
#ifWinActive ahk_class QWidget ; vlc
k::send {space} ; play/pause
~LButton:: ; click video to play/pause
keyWait, LButton
keyWait, LButton, D T.2
if (errorLevel)
{
@db93n2
db93n2 / open with sublime text.ahk
Last active February 26, 2018 18:30
(autohotkey) - open a file in sublime text (for the portable version that lacks the context menu option)
#ifWinActive ahk_class CabinetWClass ; file Explorer
^+e::
revert_clipboard := clipboardAll
clipboard =
send ^{c}
clipWait, 0.3
sublime_path := portable_apps "\SublimeText3\sublime_text.exe"
if fileExist(clipboard)
run, %sublime_path% "%clipboard%", , useErrorLevel
@db93n2
db93n2 / sublime file.ahk
Last active December 10, 2017 14:46
(autohotkey) - get the file that is open/focused in sublime text
sublime_file() {
winGetTitle, sublime_title, ahk_exe sublime_text.exe
splitPath, sublime_title, , file_dir, file_ext, name_no_ext
split := strSplit(file_ext, a_space) ; remove project name or β€’ from an unsaved file
return file_dir "\" name_no_ext "." split[1]
}
/*
description = get the file that is open/focused in sublime text
@db93n2
db93n2 / shake_torch.prf.xml
Created December 27, 2016 23:49
(tasker) - shake your phone to toggle the torch
<TaskerData sr="" dvi="1" tv="4.8u5m">
<Profile sr="prof561" ve="2">
<cdate>1454802995915</cdate>
<edate>1482880134621</edate>
<id>561</id>
<mid0>562</mid0>
<nme>shake torch</nme>
<pri>20</pri>
<State sr="con0" ve="2">
<code>120</code>
@db93n2
db93n2 / my gists - tasker.md
Last active October 21, 2017 08:41
my tasker gists
@db93n2
db93n2 / stored_in.ahk
Created December 28, 2016 08:00
(autohotkey) - get the variable stored in a name
stored_in(variable_name) {
stored_in := %variable_name%
return stored_in
}
/*
[script info]
description = get the variable stored in a name
*/
@db93n2
db93n2 / passed.ahk
Last active February 18, 2019 17:45
(autohotkey) - get the parameters that have been passed to the script
passed() {
global 0
loop, %0%
params .= (params ? a_space : "") . %a_index%
return params
}
/*
[script info]
@db93n2
db93n2 / 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
@db93n2
db93n2 / goto open folder.ahk
Last active June 30, 2020 21:30
πŸ“‚ (autohotkey) - show a list of open folders when youre at a "save as" or "open" dialog
#if winActive("ahk_class #32770") ; "save", "save as" or "open"
^+l::goSub, list_open_folders
#if
list_open_folders:
for a in comObjCreate("shell.application").windows
{
if !inStr(a.document.folder.self.path, "::{") ; ignore recycle bin & my pc
menu, open_folders, add, % a.document.folder.self.path, goto_open_folder
@db93n2
db93n2 / - all script settings.ahk
Last active August 27, 2023 08:01
πŸ“œ (autohotkey) - script settings to be included in your main script or just used as a quick reference
; name ; options (* means default) ; description
; ------------------------------ ; -------------------------------- ; ---------------------------------------------------------
; #ClipboardTimeout -1 ; -1|0|1000* (Milliseconds) ; Changes how long the script keeps trying to access the clipboard when the first attempt fails
; #CommentFlag ; NewString ; Changes the script's comment symbol from semicolon to some other string
; #ErrorStdOut ; ; Sends any syntax error that prevents a script from launching to stderr rather than displaying a dialog
; #EscapeChar ; NewChar ; Changes the script's escape character (e.g. accent vs. backslash)
; #HotkeyInterval ; 2000* (Milliseconds) ; Along with #MaxHotkeysPerInterval, specifies the rate of hotkey activations beyond which a warning dialog will be displayed
; #H