Last active
October 21, 2025 14:53
-
-
Save raveren/bac5196d2063665d2154 to your computer and use it in GitHub Desktop.
My personal autohotkey configuration (used and updated for 10+ years!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; | |
| ; ██╗███╗ ██╗██╗████████╗██╗ █████╗ ██╗ ██╗███████╗███████╗ | |
| ; ██║████╗ ██║██║╚══██╔══╝██║██╔══██╗██║ ██║╚══███╔╝██╔════╝ | |
| ; ██║██╔██╗ ██║██║ ██║ ██║███████║██║ ██║ ███╔╝ █████╗ | |
| ; ██║██║╚██╗██║██║ ██║ ██║██╔══██║██║ ██║ ███╔╝ ██╔══╝ | |
| ; ██║██║ ╚████║██║ ██║ ██║██║ ██║███████╗██║███████╗███████╗ | |
| ; ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝ | |
| ; | |
| ; https://gist.github.com/raveren/bac5196d2063665d2154/edit | |
| ; | |
| ; for ASCII art http://patorjk.com/software/taag/#f=ANSI%20Shadow | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| #NoTrayIcon | |
| #SingleInstance | |
| SetTitleMatchMode(2) ; 2 = A window's title can contain WinTitle anywhere inside it to be a match. | |
| #Requires AutoHotkey v2.0 | |
| ; RunOnStartup() | |
| ;; run as admin was disabled as it breaks drag and drop onto AHK-launched apps | |
| ; SetWorkingDir %A_ScriptDir% | |
| ; if not A_IsAdmin | |
| ; Run *RunAs "%A_ScriptFullPath%" | |
| ; ██████╗ █████╗ ██╗███╗ ██╗███╗ ███╗███████╗████████╗███████╗██████╗ | |
| ; ██╔══██╗██╔══██╗██║████╗ ██║████╗ ████║██╔════╝╚══██╔══╝██╔════╝██╔══█2█╗ | |
| ; ██████╔╝███████║██║██╔██╗ ██║██╔████╔██║█████╗ ██║ █████╗ ██████╔╝ | |
| ; ██╔══██╗██╔══██║██║██║╚██╗██║██║╚██╔╝██║██╔══╝ ██║ ██╔══╝ ██╔══██╗ | |
| ; ██║ ██║██║ ██║██║██║ ╚████║██║ ╚═╝ ██║███████╗ ██║ ███████╗██║ ██║ | |
| ; ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; set taskbar transparent to use with https://github.com/alatsombath/Fountain-of-Colors | |
| WinSetTransparent(195, "ahk_class Shell_TrayWnd") | |
| ; ███╗ ██╗██╗ ██╗███╗ ███╗██╗ ██████╗ ██████╗██╗ ██╗ | |
| ; ████╗ ██║██║ ██║████╗ ████║██║ ██╔═══██╗██╔════╝██║ ██╔╝ | |
| ; ██╔██╗ ██║██║ ██║██╔████╔██║██║ ██║ ██║██║ █████╔╝ | |
| ; ██║╚██╗██║██║ ██║██║╚██╔╝██║██║ ██║ ██║██║ ██╔═██╗ | |
| ; ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║███████╗╚██████╔╝╚██████╗██║ ██╗ | |
| ; ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; use numpad always as numbers, reuse NumLock as language switch | |
| ; toggle disabled state if without numpad | |
| ; SetNumLockState("AlwaysOff") | |
| SetNumLockState("AlwaysOn") | |
| NumpadDot::. | |
| NumLock::SendInput("{Alt down}{shift}{Alt up}") | |
| ; | |
| ; ███╗ ███╗ ██████╗ ██╗ ██╗███████╗███████╗ | |
| ; ████╗ ████║██╔═══██╗██║ ██║██╔════╝██╔════╝ | |
| ; ██╔████╔██║██║ ██║██║ ██║███████╗█████╗ | |
| ; ██║╚██╔╝██║██║ ██║██║ ██║╚════██║██╔══╝ | |
| ; ██║ ╚═╝ ██║╚██████╔╝╚██████╔╝███████║███████╗ | |
| ; ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝ | |
| ; | |
| ; Holding right or left button + press back/forward to switch tab | |
| ~RButton & XButton1::Send("^{Tab}") | |
| ~RButton & XButton2::Send("+^{Tab}") | |
| ~LButton & XButton1::Send("^{Tab}") | |
| ~LButton & XButton2::Send("+^{Tab}") | |
| ; Hold right+scroll = zoom in/out | |
| RButton & WheelUp::Send("{CTRLDOWN}{NumpadSub}{CTRLUP}") | |
| RButton & WheelDown::Send("{CTRLDOWN}{NumpadAdd}{CTRLUP}") | |
| ; ███████╗██████╗ ██████╗ ████████╗██╗███████╗██╗ ██╗ | |
| ; ██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║██╔════╝╚██╗ ██╔╝ | |
| ; ███████╗██████╔╝██║ ██║ ██║ ██║█████╗ ╚████╔╝ | |
| ; ╚════██║██╔═══╝ ██║ ██║ ██║ ██║██╔══╝ ╚██╔╝ | |
| ; ███████║██║ ╚██████╔╝ ██║ ██║██║ ██║ | |
| ; ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ | |
| ; | |
| ; nothing here works well.. | |
| ; #3:: | |
| ; { | |
| ; WinGet, active_id, ID, A | |
| ; Run, %A_AppData%\Spotify\Spotify.exe, , Hide | |
| ; WinActivate, ahk_id %active_id% | |
| ; Return | |
| ; } | |
| ; shift+volumeUp: Volume up | |
| +Volume_Up:: | |
| { | |
| if WinActive("ahk_exe spotify.exe") | |
| { | |
| Send("`"^{Up}`"") | |
| } | |
| else | |
| { | |
| spotifyHwnd := WinGetID("ahk_exe spotify.exe") | |
| ; Chromium ignores keys when it isn't focused. | |
| ; Focus the document window without bringing the app to the foreground. | |
| ControlFocus("Chrome_RenderWidgetHostHWND1", "ahk_id " spotifyHwnd) | |
| ControlSend("`"^{Up}`"", , "ahk_id " spotifyHwnd) | |
| } | |
| } | |
| ; shift+volumeDown: Volume down | |
| +Volume_Down:: | |
| { | |
| if WinActive("ahk_exe spotify.exe") | |
| { | |
| Send("`"^{Down}`"") | |
| } | |
| else | |
| { | |
| spotifyHwnd := WinGetID("ahk_exe spotify.exe") | |
| ; Chromium ignores keys when it isn't focused. | |
| ; Focus the document window without bringing the app to the foreground. | |
| ControlFocus("Chrome_RenderWidgetHostHWND1", "ahk_id " spotifyHwnd) | |
| ControlSend("`"^{Down}`"", , "ahk_id " spotifyHwnd) | |
| } | |
| } | |
| ; █████╗ ██╗ ████████╗ ██╗ ██████╗████████╗██████╗ ██╗ ██╗ ████████╗ | |
| ; ██╔══██╗██║ ╚══██╔══╝ ██║ ██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ╚══██╔══╝ | |
| ; ███████║██║ ██║ ████████████╗ ██║ ██║ ██████╔╝██║ ████████████╗ ██║ | |
| ; ██╔══██║██║ ██║ ╚════██╔════╝ ██║ ██║ ██╔══██╗██║ ╚════██╔════╝ ██║ | |
| ; ██║ ██║███████╗██║ ██║ ╚██████╗ ██║ ██║ ██║███████╗ ██║ ██║ | |
| ; ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; alt+ctrl+T = toggle currnet window to be AlwaysOnTop | |
| ; will eventually be replaced by Windows PowerToys | |
| ^!T:: | |
| { | |
| WinSetAlwaysontop(-1, "A") | |
| Title := WinGetTitle("A") | |
| ; TraySetIcon("Menu Tray, Icon","Menu Tray, Icon","Menu Tray, Icon") | |
| A_IconHidden := false | |
| TrayTip("Always on top", "For window " Title) | |
| SoundPlay(A_WinDir "\Media\notify.wav") ; beep even if alerts are off | |
| Sleep(5000) ; Let it display for 5 seconds. | |
| A_IconHidden := true | |
| } | |
| ; ██████╗ █████╗ ██████╗ ███████╗██╗ ██████╗ ██████╗██╗ ██╗ | |
| ;██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██╔═══██╗██╔════╝██║ ██╔╝ | |
| ;██║ ███████║██████╔╝███████╗██║ ██║ ██║██║ █████╔╝ | |
| ;██║ ██╔══██║██╔═══╝ ╚════██║██║ ██║ ██║██║ ██╔═██╗ | |
| ;╚██████╗██║ ██║██║ ███████║███████╗╚██████╔╝╚██████╗██║ ██╗ | |
| ; ╚═════╝╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Capslock toggles between browser and PHPStorm. | |
| /* | |
| Capslock:: | |
| { | |
| win1 := "ahk_exe audacity.exe" | |
| ;win2 := "ahk_exe firefox.exe" | |
| win2 := "ahk_exe SumatraPDF.exe" | |
| if WinActive( win1 ) | |
| { | |
| WinActivate(win2) | |
| } else { | |
| WinActivate(win1) | |
| } | |
| } | |
| */ | |
| Capslock:: | |
| { | |
| ; editor := "ahk_exe sublime_text.exe" | |
| editor := "ahk_exe phpstorm64.exe" | |
| browser := "ahk_exe firefox.exe" | |
| ; browser := "ahk_exe chrome.exe" | |
| secondary_browser := "ahk_exe chrome.exe" | |
| ; secondary_editor := "ahk_exe sublime_text.exe" | |
| if ( WinActive( secondary_browser ) ) | |
| { | |
| if ( WinExist( browser ) ) { | |
| WinActivate(browser, , "Developer Tools") | |
| } | |
| } else { | |
| if ( WinActive( editor ) ) { | |
| Send("^+!s") ; alt+ctrl+shift+s = save all, must be bound | |
| } | |
| if WinActive( browser ) { | |
| if ( WinExist( editor ) ) { | |
| SetTitleMatchMode("RegEx") | |
| WinActivate(editor, , "^Terminal|^Git") | |
| ; Switches the active window's keyboard layout/language to English (US). | |
| PostMessage 0x0050, 0, 0x4090409,, "A" ; | |
| SetTitleMatchMode(2) | |
| } | |
| } else { | |
| if ( WinExist( browser ) ) { | |
| WinActivate(browser, , "Developer Tools") | |
| } else { | |
| if ( WinExist( secondary_browser ) ) { | |
| WinActivate(secondary_browser) | |
| } else { | |
| Run("firefox") | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ; ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██████╗ █████╗ ██████╗ ███████╗ | |
| ; ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔════╝██╔══██╗██╔══██╗██╔════╝ | |
| ; ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ ███████║██████╔╝███████╗ | |
| ; ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║ ██╔══██║██╔═══╝ ╚════██║ | |
| ; ███████║██║ ██║██║██║ ██║ ██║ ╚██████╗██║ ██║██║ ███████║ | |
| ; ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Shift+Capslock toggles between windows of active app (like different firefox windows) | |
| +Capslock:: | |
| { | |
| ActiveApp := WinGetProcessName("A") | |
| WinActivateBottom("ahk_exe " . ActiveApp) | |
| } | |
| ; ██████╗████████╗██████╗ ██╗ ██╗ █████╗ ██╗ ████████╗ ██╗ ██████╗ | |
| ; ██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔══██╗██║ ╚══██╔══╝ ██║ ██╔══██╗ | |
| ; ██║ ██║ ██████╔╝██║ ████████████╗ ███████║██║ ██║ ████████████╗ ██████╔╝ | |
| ; ██║ ██║ ██╔══██╗██║ ╚════██╔════╝ ██╔══██║██║ ██║ ╚════██╔════╝ ██╔══██╗ | |
| ; ╚██████╗ ██║ ██║ ██║███████╗ ██║ ██║ ██║███████╗██║ ██║ ██║ ██║ | |
| ; ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Ctrl+Alt+R Reloads this script | |
| ^!r:: | |
| { | |
| MsgBox("Reloading autohotkey script " A_ScriptFullPath) | |
| Reload() | |
| } | |
| ; ██████╗ ██╗ ██╗██████╗ ███████╗████████╗ ██████╗ ██████╗ ███╗ ███╗ | |
| ; ██╔══██╗██║ ██║██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗████╗ ████║ | |
| ; ██████╔╝███████║██████╔╝███████╗ ██║ ██║ ██║██████╔╝██╔████╔██║ | |
| ; ██╔═══╝ ██╔══██║██╔═══╝ ╚════██║ ██║ ██║ ██║██╔══██╗██║╚██╔╝██║ | |
| ; ██║ ██║ ██║██║ ███████║ ██║ ╚██████╔╝██║ ██║██║ ╚═╝ ██║ | |
| ; ╚═╝ ╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| #HotIf WinActive("ahk_exe phpstorm64.exe", ) | |
| ; pressing f5 in PhpStorm activates Firefox and refreshes | |
| F5:: | |
| { | |
| Send("^s") | |
| ; integration with beyond compare's specially named session for working with the Sage external library | |
| if WinExist("sage <--> sage") { | |
| WinActivate | |
| Send("{F5}") | |
| Sleep(200) | |
| Send("{F6}") | |
| Sleep(200) | |
| } | |
| ; WinActivate("ahk_exe chrome.exe") | |
| WinActivate("ahk_exe firefox.exe") | |
| SendInput("{F5}") | |
| } | |
| ; NumLock sets locale to English | |
| NumLock::PostMessage 0x0050, 0, 0x4090409,, "A" | |
| ; Hold left mouse button and click the right one to (attempt to) open the defiition in opposite pane | |
| ~LButton & RButton::{ | |
| Click | |
| Sleep(50) | |
| SendInput("!g") ; mapped to "Open in opposite group" | |
| Sleep(50) | |
| SendInput("^b") | |
| } | |
| ~RButton & LButton::SendInput("{F7}") | |
| ~LButton & XButton1::SendInput("{F7}") | |
| ~LButton & XButton2::SendInput("{F7}") | |
| ;MButton::{ | |
| ; Click | |
| ; Sleep(100) | |
| ; SendInput("!g") | |
| ; Sleep(100) | |
| ; SendInput("^b") | |
| ;} | |
| ; map alt+f4 to my often used alt+f3 | |
| !F4::!F3 | |
| ; disable alt acceleration | |
| ~LAlt::Send("{Blind}{vkE8}") | |
| #HotIf | |
| #HotIf WinActive("ahk_exe firefox.exe") | |
| F10:: ; run in PHPStorm | |
| { | |
| WinActivate("ahk_exe phpstorm64.exe") | |
| SendInput("{F10}") | |
| } | |
| #HotIf | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██████╗ ██╗██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔════╝ ██╔╝██║ ██║ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ ██╔╝ ██║ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║ ██╔╝ ╚██╗ ██╔╝ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ╚██████╗██╔╝ ╚████╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═══╝ | |
| ; For Ditto, it does not accept this shortcut which seems organic to my fingers. | |
| #+C::SendInput("#!^c") ; instead map Ditto functionality in-app to win+shift+alt+ctrl+c | |
| #+V::SendInput("#!^v") | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██║ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ███████╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Shift+WIN+L locks pc for 15 minutes | |
| +#L:: | |
| { | |
| ; Process,Close,Cold Turkey Blocker.exe | |
| Run("`"C:\Program Files\Cold Turkey\Cold Turkey Blocker.exe`" -start `"Frozen Turkey`" -lock 15") | |
| } | |
| ; ██████╗ ██████╗ ████████╗███████╗ ██████╗ | |
| ; ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔════╝ | |
| ; ██████╔╝██████╔╝ ██║ ███████╗██║ | |
| ; ██╔═══╝ ██╔══██╗ ██║ ╚════██║██║ | |
| ; ██║ ██║ ██║ ██║ ███████║╚██████╗ | |
| ; ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ | |
| ; | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ███████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔════╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ███████╗ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ╚════██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ███████║ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ | |
| ; | |
| ; Shift+WIN+S and Prtscr invokes ShareX to capture region | |
| PrintScreen:: | |
| +#S:: { | |
| Run("C:\Apps\ShareX (screenshot)\ShareX.exe -RectangleRegion") | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔══██╗ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ██████╔╝ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██╔══██╗ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ██║ ██║ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Shift+WIN+R Sets custom windows layout | |
| +#R:: | |
| { | |
| RepositionMyWindows() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔═══██╗ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║▄▄ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ╚██████╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══▀▀═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Shift+WIN+Q opens all my shit | |
| +#Q:: | |
| { | |
| KeyWait("Shift") ; holding shift when launching firefox apparently puts it into troubleshooting mode :) | |
| RunOnStartup() | |
| } | |
| RunOnStartup() | |
| { | |
| Run("`"C:\Program Files\OpenVPN\bin\openvpn-gui.exe`" --command connect ecu") | |
| Run("phpstorm") | |
| if ( ! WinExist( "ahk_exe firefox.exe" ) ) { | |
| Run("firefox") | |
| } | |
| WinWait("ahk_exe phpstorm64.exe") | |
| WinWait("Firefox") | |
| } | |
| RepositionMyWindows() | |
| { | |
| if(MonitorGetCount() = 3) { | |
| MoveWindowsToMonitor(3, "] – ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(1, "Find - ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(1, "Git - ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(1, "Bitbucket Pull Requests - ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(1, "ahk_exe firefox.exe") | |
| MoveWindowsToMonitor(2, "Terminal - ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(2, "Run - ahk_exe phpstorm64.exe") | |
| MoveWindowsToMonitor(2, "ahk_exe Spotify.exe") | |
| MoveWindowsToMonitor(2, "ahk_exe slack.exe") | |
| MoveWindowsToMonitor(2, "Developer Tools — ahk_exe firefox.exe") | |
| } | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██║ ██║ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ █╗ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║███╗██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚███╔███╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══╝╚══╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+W opens wallpaper from screen under mouse | |
| #W:: | |
| { | |
| openWallpaperUnderMouse() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ ███╗ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚██████╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+G searches selected text in google (good calculator!). Alternatively recognizes | |
| ; explorer and Regedit paths. if the shortcut is overriden by xbox crap see: | |
| ; https://gist.github.com/joshschmelzle/04c57d957c5bb92e85ae9180021b26dc | |
| #G:: | |
| { | |
| SavedClipboard := ClipboardAll() | |
| A_Clipboard := "" ; empty the clipboard | |
| Send("^c") | |
| Errorlevel := !ClipWait(0.5) | |
| if ErrorLevel { | |
| A_Clipboard := SavedClipboard | |
| return | |
| } | |
| SelectedText := trim(A_Clipboard) | |
| if RegExMatch(SelectedText, "^https?://") { | |
| Run(SelectedText) | |
| } else if RegExMatch(SelectedText, "^(Computer\\)?(HKEY)|(HKU)|(HKCC)|(HKCU)|(HKLM)") { | |
| RegJump( SelectedText ) | |
| } else if RegExMatch(SelectedText, "^\d:\\") { | |
| ExplorerPath:= "explorer /select," SelectedText | |
| Run(ExplorerPath) | |
| } else { | |
| ; Modify some characters that screw up the URL | |
| SelectedText := StrReplace(SelectedText, "`r`n", A_Space) | |
| SelectedText := StrReplace(SelectedText, "#", "`%23") | |
| SelectedText := StrReplace(SelectedText, "&", "`%26") | |
| SelectedText := StrReplace(SelectedText, "+", "`%2b") | |
| SelectedText := StrReplace(SelectedText, "`"", "`%22") | |
| Run("https://www.google.com/search?hl=en&q=" . SelectedText) | |
| } | |
| ; Clipboard := SavedClipboard | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ █████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔══██╗ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██╔══██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ██║ ██║ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+A: Slack | |
| #a:: | |
| { | |
| if (! WinExist("ahk_exe Rocket.Chat.exe")) { | |
| Run("C:\Program Files\Rocket.Chat\Rocket.Chat.exe") | |
| WinWait("ahk_exe Rocket.Chat.exe") | |
| } | |
| MoveWindowsToMonitor(2, "ahk_exe Rocket.Chat.exe") | |
| WinActivate() | |
| ;if (! WinExist("ahk_exe slack.exe")) { | |
| ; Run(A_AppData "\..\Local\slack\slack.exe") | |
| ; WinWait("ahk_exe slack.exe") | |
| ;} | |
| ;MoveWindowsToMonitor(2, "ahk_exe slack.exe") | |
| ;WinActivate() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ╚██╗██╔╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ╚███╔╝ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██╔██╗ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╗███████║██║ ██║██║██║ ██║ ██║ ██╔╝ ██╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+F: Spotify | |
| #+X:: | |
| { | |
| if (! WinExist("ahk_exe spotify.exe")) { | |
| Run("spotify.exe") | |
| WinWait("ahk_exe spotify.exe") | |
| } | |
| MoveWindowsToMonitor(2, "ahk_exe Spotify.exe") | |
| WinActivate() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+S is sublime text | |
| #s:: | |
| { | |
| if (! WinExist("ahk_exe sublime_text.exe")) { | |
| Run("C:\apps\SublimeText\sublime_text.exe") | |
| WinWait("ahk_exe sublime_text.exe") | |
| } | |
| WinActivate() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔═══██╗ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║▄▄ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚██████╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══▀▀═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+q is chrome | |
| #q:: | |
| { | |
| if (! WinExist("Google Chrome")) { | |
| Run("chrome") | |
| WinWait("Google Chrome") | |
| } | |
| WinActivate() | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ╚██╗██╔╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ╚███╔╝ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██╔██╗ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ██╔╝ ██╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+X is play media | |
| #x:: | |
| { | |
| Send("{Media_Play_Pause}") | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ╚══███╔╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███╔╝ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ███╔╝ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+Z previous track | |
| #z:: | |
| { | |
| Send("{Media_Prev}") | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██║ ██║ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚██╗ ██╔╝ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚████╔╝ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═══╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+V next track | |
| #v:: | |
| { | |
| Send("{Media_Next}") | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚██████╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+C opens shell in currently visible folder/PhpStorm project | |
| #c:: | |
| { | |
| FullPath := getPathFromActiveWindow() | |
| ; MsgBox("aaa '" . FullPath . "'") | |
| if InStr(FullPath, ":") { | |
| ; Run("C:\apps\cmder\Cmder.exe /start `"" Fullpath "`"") | |
| Run("wt -d `"" . Fullpath . "`"") | |
| } else if InStr(FullPath, "/") { | |
| Run("wt -p `"Ubuntu WSL`" -d `"" . Fullpath . "`"") | |
| } else { | |
| Run("wt") | |
| } | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██╔════╝ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ █████╗ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██╔══╝ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+E focuses open explorer window (for qttabbar). Pressing again opens My PC. | |
| #e:: | |
| { | |
| if ( WinActive("ahk_exe explorer.exe") ) { | |
| Run("shell:mycomputerfolder") | |
| } else { | |
| FullPath := getPathFromActiveWindow() | |
| hwnd := WinExist("ahk_exe explorer.exe ahk_class CabinetWClass") | |
| if (hwnd) { | |
| WinActivate() | |
| WinWaitActive() | |
| } else { | |
| Run("shell:mycomputerfolder") | |
| WinWait("ahk_class CabinetWClass") | |
| WinActivate() | |
| } | |
| if (FullPath) { | |
| if InStr(FullPath, ":") { | |
| ; Run("wt -d `"" . Fullpath . "`"") | |
| } else if InStr(FullPath, "/") { | |
| FullPath := StrReplace(FullPath, "/", "\") | |
| FullPath := "\\wsl.localhost\Ubuntu" . FullPath | |
| } | |
| ExplorerNewTab(FullPath) | |
| } | |
| } | |
| } | |
| ; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ | |
| ; ██║ ██║██║████╗ ██║ ██║ ██║ | |
| ; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ | |
| ; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║ | |
| ; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████╗ | |
| ; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; WIN+L: pause media and turn off monitor when locking screen | |
| #l:: | |
| { | |
| Send("{Media_Stop}") | |
| Sleep(1000) ; Give user a chance to release keys (in case their release would wake up the monitor again). | |
| ; Turn Monitor Off: | |
| SendMessage(0x112, 0xF170, 2, , "Program Manager") ; 0x112 is WM_SYSCOMMAND, 0xF170 is SC_MONITORPOWER. | |
| ; Note for the above: Use -1 in place of 2 to turn the monitor on. | |
| ; Use 1 in place of 2 to activate the monitor's low-power mode. | |
| ; Lock Workstation: | |
| DllCall("LockWorkStation") | |
| } | |
| ; █████╗ ██╗ ████████╗ ██╗ ███████╗███████╗ | |
| ;██╔══██╗██║ ╚══██╔══╝ ██║ ██╔════╝██╔════╝ | |
| ;███████║██║ ██║ ████████████╗ █████╗ ███████╗ | |
| ;██╔══██║██║ ██║ ╚════██╔════╝ ██╔══╝ ╚════██║ | |
| ;██║ ██║███████╗██║ ██║ ██║ ███████║ | |
| ;╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; ALT+F5 inserds current date time | |
| !F5:: | |
| { | |
| CurrentDateTime := FormatTime(, "yyyyMMdd_HHmmss") | |
| Send(CurrentDateTime) | |
| } | |
| ; █████╗ ██╗ ████████╗ ██╗ ██████╗ | |
| ;██╔══██╗██║ ╚══██╔══╝ ██║ ██╔═████╗ | |
| ;███████║██║ ██║ ████████████╗ ██║██╔██║ | |
| ;██╔══██║██║ ██║ ╚════██╔════╝ ████╔╝██║ | |
| ;██║ ██║███████╗██║ ██║ ╚██████╔╝ | |
| ;╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; ALT+0 Increments the selected number, or types the next number if nothing selected | |
| LastIncrementedNumber := -1 | |
| !0::IncrementSelectedNumber() | |
| !^0::IncrementSelectedNumber(true) | |
| IncrementSelectedNumber( decrement := false) | |
| { | |
| global LastIncrementedNumber | |
| SavedClipboard := ClipboardAll() | |
| Send("^c") | |
| Errorlevel := !ClipWait(0.5) | |
| if ( ErrorLevel || ! RegExMatch(A_Clipboard, "^-?\d+$") ) { | |
| NumberToIncrement := LastIncrementedNumber | |
| } else { | |
| NumberToIncrement := A_Clipboard | |
| } | |
| A_Clipboard := SavedClipboard | |
| if (decrement) { | |
| NumberToIncrement-- | |
| } else{ | |
| NumberToIncrement++ | |
| } | |
| LastIncrementedNumber := NumberToIncrement | |
| SendInput(NumberToIncrement) | |
| numLen := StrLen( NumberToIncrement ) | |
| Loop numLen | |
| { | |
| SendInput("+{Left}") | |
| } | |
| } | |
| ; ██████╗████████╗██████╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ███████╗ █████╗ | |
| ; ██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔════╝██╔══██╗ | |
| ; ██║ ██║ ██████╔╝██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ █████╗ ╚█████╔╝ | |
| ; ██║ ██║ ██╔══██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██╔══╝ ██╔══██╗ | |
| ; ╚██████╗ ██║ ██║ ██║███████ ██║ ╗███████║██║ ██║██║██║ ██║ ██║ ██║ ╚█████╔╝ | |
| ; ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚════╝ | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; CTRL+SHIFT+F8 turns on autoclicker -- hold right mouse button to clickspam the right one | |
| AutoClickerOn := false | |
| ^+f8:: { | |
| global AutoClickerOn := !AutoClickerOn | |
| SoundBeep 1000 + 500 * AutoClickerOn | |
| } | |
| #HotIf AutoClickerOn | |
| 1:: { | |
| While GetKeyState(ThisHotkey, 'P') { | |
| Click | |
| Sleep 40 | |
| } | |
| } | |
| #HotIf | |
| ;████████╗███████╗██╗ ██╗████████╗ | |
| ;╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝ | |
| ; ██║ █████╗ ╚███╔╝ ██║ | |
| ; ██║ ██╔══╝ ██╔██╗ ██║ | |
| ; ██║ ███████╗██╔╝ ██╗ ██║ | |
| ; ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; https://www.autohotkey.com/docs/v2/Hotstrings.htm | |
| ; | |
| ; TYPE ";eur" to replace it with €. This file must be saved in UTF8 with BOM for this to work: | |
| :?:;eur::€ | |
| :*:r@::[email protected] | |
| :*:rČ::[email protected] | |
| ; ██╗ ██╗███████╗██╗ ██████╗ ███████╗██████╗ ███████╗ | |
| ; ██║ ██║██╔════╝██║ ██╔══██╗██╔════╝██╔══██╗██╔════╝ | |
| ; ███████║█████╗ ██║ ██████╔╝█████╗ ██████╔╝███████╗ | |
| ; ██╔══██║██╔══╝ ██║ ██╔═══╝ ██╔══╝ ██╔══██╗╚════██║ | |
| ; ██║ ██║███████╗███████╗██║ ███████╗██║ ██║███████║ | |
| ; ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| Dump(params*) | |
| { | |
| result := '' | |
| for val in params { | |
| result .= (!IsSet(val) || IsObject(val) ? ToString(val?) : val) . "`n------------`n" | |
| } | |
| MsgBox(result) | |
| } | |
| getPathFromActiveWindow() | |
| { | |
| if ( WinActive("ahk_exe explorer.exe") ) { | |
| ActiveExplorer := WinActive("ahk_exe explorer.exe") | |
| Fullpath := "" | |
| for window in ComObject("Shell.Application").Windows { | |
| if (window && window.hwnd && window.hwnd == ActiveExplorer) { | |
| Fullpath := window.Document.Folder.Self.Path | |
| } else { | |
| Fullpath := A_Desktop | |
| } | |
| } | |
| if InStr(Fullpath, "\") { | |
| if InStr(Fullpath, "\\wsl.localhost\Ubuntu") { | |
| Fullpath := StrReplace(Fullpath, "\\wsl.localhost\Ubuntu", "") | |
| Fullpath := StrReplace(Fullpath, "\", "/") | |
| } else if InStr(Fullpath, "\\wsl$\Ubuntu") { | |
| Fullpath := StrReplace(Fullpath, "\\wsl$\Ubuntu", "") | |
| Fullpath := StrReplace(Fullpath, "\", "/") | |
| } | |
| ; cmder can't handle trailing slash | |
| Fullpath := RegExReplace(Fullpath, "[/\\]$") | |
| return Fullpath | |
| } else { | |
| return "" | |
| } | |
| } else if ( WinActive( "ahk_exe phpstorm64.exe" ) ) { | |
| ActiveTitle := WinGetTitle("A") | |
| IsFound := RegExMatch(ActiveTitle, "\[(.*)\] – (.*)", &Match) | |
| if (IsFound) { | |
| ProjectPath := Match[1] | |
| FilePath := Match[2] | |
| ; msgbox(ProjectPath) | |
| ; get dir path | |
| FilePath := RegExReplace(FilePath, "[^/\\]+$") | |
| if InStr(FilePath, "…") { | |
| FilePath := StrReplace(FilePath, "…") | |
| ProjectPath := ProjectPath . FilePath | |
| } else { ; external file with full path | |
| ProjectPath := FilePath | |
| } | |
| if InStr(ProjectPath, "//wsl$/Ubuntu") { | |
| ProjectPath := StrReplace(ProjectPath, "//wsl$/Ubuntu", "") | |
| ProjectPath := StrReplace(ProjectPath, "\", "/") | |
| } else { | |
| ; PHPStorm shows project path with \ always - even windows paths, not only wsl ones | |
| ProjectPath := StrReplace(ProjectPath, "/", "\") | |
| } | |
| ; cmder can't handle trailing slash | |
| ProjectPath := RegExReplace(ProjectPath, "[/\\]$") | |
| return ProjectPath | |
| } | |
| } else { | |
| return "" | |
| } | |
| } | |
| ExplorerNewTab(path) | |
| { | |
| backup := A_Clipboard | |
| A_Clipboard := path | |
| Run(A_ScriptDir . "\autohotkey--open-new-qttabbar-tab.vbs") | |
| Sleep(100) | |
| A_Clipboard := backup | |
| } | |
| openWallpaperUnderMouse() | |
| { | |
| monitorNumberUnderMouse := getMonitorUnderMouse() | |
| hexString := RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "TranscodedImageCache_00" . monitorNumberUnderMouse) | |
| ; format "F5A6" => "F5,A6" | |
| loop Parse, hexString | |
| { | |
| NewHexString .= A_LoopField (Mod(A_Index,2) ? "" : ",") | |
| } | |
| consequtiveZeroes := 0 | |
| loop Parse, NewHexString, "," | |
| { | |
| if (A_Index < 25) | |
| { | |
| continue | |
| } | |
| ; detect string end \0 | |
| if (consequtiveZeroes > 1) | |
| { | |
| break | |
| } | |
| ; convert HEX to ASCII | |
| if (A_LoopField = 0) | |
| { | |
| consequtiveZeroes := consequtiveZeroes + 1 | |
| } else { | |
| ConvString .= Chr("0x" A_LoopField) | |
| consequtiveZeroes := 0 | |
| } | |
| } | |
| Run(ConvString) | |
| } | |
| getMonitorUnderMouse() | |
| { | |
| CoordMode("Mouse", "Screen") | |
| MouseGetPos(&MX, &MY) | |
| NumberOfMonitors := SysGet(80) | |
| loop NumberOfMonitors { | |
| MonitorGetWorkArea(A_Index, &Left, &Top, &Right, &Bottom ) | |
| if (MX >= Left && MX <= Right && MY >= Top && MY <= Bottom) { | |
| return A_Index - 1 | |
| } | |
| } | |
| Return 0 | |
| } | |
| ;Open Regedit and navigate to RegPath. | |
| ;RegPath accepts both HKEY_LOCAL_MACHINE and HKLM formats. | |
| RegJump(RegPath) | |
| { | |
| ;Must close Regedit so that next time it opens the target key is selected | |
| if WinExist("Registry Editor"){ | |
| WinKill("Registry Editor") | |
| } | |
| ; remove leading Computer | |
| ; if (SubStr(RegPath, 1, 9) = "Computer\"){ | |
| ; RegPath := SubStr(RegPath, 10) | |
| ; } | |
| ;remove trailing "\" if present | |
| if (SubStr(RegPath, -1) = "\"){ | |
| RegPath := SubStr(RegPath, 1, -1) | |
| } | |
| ;Extract RootKey part of supplied registry path | |
| Loop Parse, RegPath, "\" | |
| { | |
| RootKey := A_LoopField | |
| Break | |
| } | |
| ;Now convert RootKey to standard long format | |
| if !InStr(RootKey, "HKEY_") ;if short form, convert to long form | |
| { | |
| if (RootKey = "HKCR") | |
| RegPath := StrReplace(RegPath, RootKey, "HKEY_CLASSES_ROOT",,, 1) | |
| Else if (RootKey = "HKCU") | |
| RegPath := StrReplace(RegPath, RootKey, "HKEY_CURRENT_USER",,, 1) | |
| Else if (RootKey = "HKLM") | |
| RegPath := StrReplace(RegPath, RootKey, "HKEY_LOCAL_MACHINE",,, 1) | |
| Else if (RootKey = "HKU") | |
| RegPath := StrReplace(RegPath, RootKey, "HKEY_USERS",,, 1) | |
| Else if (RootKey = "HKCC") | |
| RegPath := StrReplace(RegPath, RootKey, "HKEY_CURRENT_CONFIG",,, 1) | |
| } | |
| ;Make target key the last selected key, which is the selected key next time Regedit runs | |
| RegWrite(RegPath, "REG_SZ", "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit", "LastKey") | |
| Run("Regedit.exe") | |
| } | |
| MoveWindowsToMonitor(MonitorNo, WinTitle, WinText?, ExcludeTitle?, ExcludeText?) { | |
| try | |
| { | |
| MonitorGet(MonitorNo, &TargetMonitorLeft, &TargetMonitorTop) | |
| } | |
| catch ; MonitorGet just throws exception if monitor is disconnected | |
| { | |
| return | |
| } | |
| WindowIds := WinGetList(WinTitle, WinText?, ExcludeTitle?, ExcludeText?) | |
| SetWinDelay -1 | |
| for (WindowId in WindowIds) { | |
| WinGetPosEx(WindowId, &NowLeft, &NowTop, , , , &LeftBorder, &TopBorder) | |
| MinMax := WinGetMinMax(WindowId) | |
| if (MinMax = 1 && NowLeft = TargetMonitorLeft && NowTop = TargetMonitorTop) { | |
| continue | |
| } | |
| if (MinMax != 0) { | |
| WinRestore(WindowId) | |
| } | |
| WinMove(TargetMonitorLeft - LeftBorder, TargetMonitorTop - TopBorder, , , WindowId) | |
| WinMaximize(WindowId) | |
| } | |
| } | |
| /** | |
| * https://github.com/Descolada/AHK-v2-libraries/blob/main/Lib/Misc.ahk (modified by me) | |
| * | |
| * Converts a value (number, array, object) to a string. | |
| * @param value Optional: the value to convert. | |
| * @returns {String} | |
| */ | |
| ToString(val?) { | |
| if !IsSet(val) | |
| return "unset" | |
| valType := Type(val) | |
| switch valType, 0 { | |
| case "String": | |
| return "'" val "'" | |
| case "Integer": | |
| return "Integer: " . val | |
| case "Float": | |
| return "Float: " . val | |
| default: | |
| self := "", iter := "", out := "" | |
| try self := ToString(val.ToString()) ; if the object has ToString available, print it | |
| if valType != "Array" { ; enumerate object with key and value pair, except for array | |
| try { | |
| enum := val.__Enum(2) | |
| while (enum.Call(&val1, &val2)) | |
| iter .= ToString(val1) ":" ToString(val2?) ", " | |
| } | |
| } | |
| if !IsSet(enum) { ; if enumerating with key and value failed, try again with only value | |
| try { | |
| enum := val.__Enum(1) | |
| while (enum.Call(&enumVal)) | |
| iter .= ToString(enumVal?) ", " | |
| } | |
| } | |
| if !IsSet(enum) && (valType = "Object") && !self { ; if everything failed, enumerate Object props | |
| for k, v in val.OwnProps() | |
| iter .= SubStr(ToString(k), 2, -1) ":" ToString(v?) ", " | |
| } | |
| iter := SubStr(iter, 1, StrLen(iter)-2) | |
| if !self && !iter && !((valType = "Array" && val.Length = 0) || (valType = "Map" && val.Count = 0) || (valType = "Object" && ObjOwnPropCount(val) = 0)) | |
| return valType ; if no additional info is available, only print out the type | |
| else if self && iter | |
| out .= "value:" self ", iter:[" iter "]" | |
| else | |
| out .= self iter | |
| return (valType = "Object") ? "{" out "}" : (valType = "Array") ? "[" out "]" : valType "(" out ")" | |
| } | |
| } | |
| /** | |
| * https://github.com/Descolada/AHK-v2-libraries/blob/main/Lib/Misc.ahk | |
| * | |
| * Gets the position, size, and offset of a window. See the *Remarks* section for more information. | |
| * Source: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=3392 | |
| * Additional credits: original idea and some code from *KaFu* (AutoIt forum) | |
| * @param WinTitle Target window title or handle | |
| * @param X Optional: contains the screen x-coordinate of the window | |
| * @param Y Optional: contains the screen y-coordinate of the window | |
| * @param Width Optional: contains the width of the window | |
| * @param Height Optional: contains the height of the window | |
| * @param LeftBorder Optional: thickness of the invisible left border | |
| * @param TopBorder Optional: thickness of the invisible top border | |
| * @param RightBorder Optional: thickness of the invisible right border | |
| * @param BottomBorder Optional: thickness of the invisible bottom border | |
| * @returns {Integer} Returns 0 if failed, otherwise the window handle | |
| * | |
| * Remarks: | |
| * | |
| * Starting with Windows Vista, Microsoft includes the Desktop Window Manager | |
| * (DWM) along with Aero-based themes that use DWM. Aero themes provide new | |
| * features like a translucent glass design with subtle window animations. | |
| * Unfortunately, the DWM doesn't always conform to the OS rules for size and | |
| * positioning of windows. If using an Aero theme, many of the windows are | |
| * actually larger than reported by Windows when using standard commands (Ex: | |
| * WinGetPos, GetWindowRect, etc.) and because of that, are not positioned | |
| * correctly when using standard commands (Ex: Gui.Show, WinMove, etc.). This | |
| * function was created to 1) identify the true position and size of all | |
| * windows regardless of the window attributes, desktop theme, or version of | |
| * Windows and to 2) identify the appropriate offset that is needed to position | |
| * the window if the window is a different size than reported. | |
| * | |
| * The true size, position, and offset of a window cannot be determined until | |
| * the window has been rendered. See the example script for an example of how | |
| * to use this function to position a new window. | |
| */ | |
| WinGetPosEx(WinTitle:="", &X := "", &Y := "", &Width := "", &Height := "", &LeftBorder := 0, &TopBorder := 0, &RightBorder := 0, &BottomBorder := 0) { | |
| static S_OK := 0x0, DWMWA_EXTENDED_FRAME_BOUNDS := 9 | |
| local RECT := Buffer(16, 0), RECTPlus := Buffer(24,0), R, B | |
| if !(WinTitle is Integer) | |
| WinTitle := WinGetID(WinTitle) | |
| DllCall("GetWindowRect", "Ptr", WinTitle, "Ptr", RECT) | |
| try DWMRC := DllCall("dwmapi\DwmGetWindowAttribute", "Ptr", WinTitle, "UInt", DWMWA_EXTENDED_FRAME_BOUNDS, "Ptr", RECTPlus, "UInt", 16, "UInt") | |
| catch | |
| return 0 | |
| X := NumGet(RECTPlus, 0, "Int"), LeftBorder := X - NumGet(RECT, 0, "Int") | |
| Y := NumGet(RECTPlus, 4, "Int"), TopBorder := Y - NumGet(RECT, 4, "Int") | |
| R := NumGet(RECTPlus, 8, "Int"), RightBorder := NumGet(RECT, 8, "Int") - R | |
| B := NumGet(RECTPlus, 12, "Int"), BottomBorder := NumGet(RECT, 12, "Int") - B | |
| Width := R - X | |
| Height := B - Y | |
| return WinTitle | |
| } | |
| ;██████╗ ██╗███████╗ █████╗ ██████╗ ██╗ ███████╗██████╗ | |
| ;██╔══██╗██║██╔════╝██╔══██╗██╔══██╗██║ ██╔════╝██╔══██╗ | |
| ;██║ ██║██║███████╗███████║██████╔╝██║ █████╗ ██║ ██║ | |
| ;██║ ██║██║╚════██║██╔══██║██╔══██╗██║ ██╔══╝ ██║ ██║ | |
| ;██████╔╝██║███████║██║ ██║██████╔╝███████╗███████╗██████╔╝ | |
| ;╚═════╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝╚═════╝ | |
| ; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; pressing alt+s on micro:bit saves it to device | |
| ; #IfWinActive, Microsoft MakeCode for micro:bit | |
| ; !s:: | |
| ; { | |
| ; Click, 214, 780 Left | |
| ; WinWaitActive, Save As ahk_class #32770 ; wait for save window | |
| ; Click, 614, 448 Left | |
| ; Sleep, 200 | |
| ; Click, 1130, 275 Left ; click x | |
| ; Sleep, 100 | |
| ; Click, 1084, 394 Left | |
| ; } | |
| ; #IfWinActive | |
| ; return | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; move window - press and hold left button -> press both mouse buttons -> move. | |
| ; does not work on PhpStorm as the combo is rebounded there | |
| ; ~LButton & RButton:: | |
| ; EWD_MoveWindow(*) | |
| ; { | |
| ; CoordMode "Mouse" ; Switch to screen/absolute coordinates. | |
| ; MouseGetPos &EWD_MouseStartX, &EWD_MouseStartY, &EWD_MouseWin | |
| ; WinGetPos &EWD_OriginalPosX, &EWD_OriginalPosY,,, EWD_MouseWin | |
| ; ; if !WinGetMinMax(EWD_MouseWin) ; Only if the window isn't maximized | |
| ; SetTimer EWD_WatchMouse, 10 ; Track the mouse as the user drags it. | |
| ; EWD_WatchMouse() | |
| ; { | |
| ; if !GetKeyState("LButton", "P") ; Button has been released, so drag is complete. | |
| ; { | |
| ; SetTimer , 0 | |
| ; return | |
| ; } | |
| ; if GetKeyState("Escape", "P") ; Escape has been pressed, so drag is cancelled. | |
| ; { | |
| ; SetTimer , 0 | |
| ; WinMove EWD_OriginalPosX, EWD_OriginalPosY,,, EWD_MouseWin | |
| ; return | |
| ; } | |
| ; ; Otherwise, reposition the window to match the change in mouse coordinates | |
| ; ; caused by the user having dragged the mouse: | |
| ; CoordMode "Mouse" | |
| ; MouseGetPos &EWD_MouseX, &EWD_MouseY | |
| ; WinGetPos &EWD_WinX, &EWD_WinY,,, EWD_MouseWin | |
| ; SetWinDelay -1 ; Makes the below move faster/smoother. | |
| ; WinMove EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY,,, EWD_MouseWin | |
| ; EWD_MouseStartX := EWD_MouseX ; Update for the next timer-call to this subroutine. | |
| ; EWD_MouseStartY := EWD_MouseY | |
| ; } | |
| ; } | |
| ; ~^c:: { | |
| ; Sleep(40) | |
| ; Send("+!g") | |
| ; Sleep(40) | |
| ; WinActivate("ahk_exe firefox.exe") | |
| ; Sleep(40) | |
| ; Send("+{Tab}") | |
| ; Send("+{Tab}") | |
| ; Send("+{Tab}") | |
| ; Send("+{Tab}") | |
| ; Send("^a") | |
| ; Send("^v") | |
| ; Send("{Tab}") | |
| ; Send("{Space}") | |
| ; Send("{Tab}") | |
| ; Send("{Tab}") | |
| ; ; Send("{Tab}") | |
| ; Send("{Tab}") | |
| ; Send("^a") | |
| ; Send("^c") | |
| ; WinActivate("ahk_exe winword.exe") | |
| ; } | |
| ; ~^v::{ | |
| ; Sleep(40) | |
| ; Send("{Enter}") | |
| ; } | |
| ; Convert last entered Lithuanian letters to their number counterparts if I switch language | |
| ; Loop { | |
| ; Input, LastKey, L1 V | |
| ; LastPress := A_TickCount | |
| ; WinGet, LastWindow, ID, A | |
| ; } | |
| ; NumLock:: | |
| ; SendInput, {Alt down}{shift}{Alt up} | |
| ; WinGet, CurrentWindow, ID, A | |
| ; SinceLastPress := A_TickCount - LastPress | |
| ; if ( SinceLastPress > 4000 or CurrentWindow != LastWindow ) { | |
| ; LastKey := | |
| ; return | |
| ; } | |
| ; Matched := true | |
| ; switch LastKey | |
| ; { | |
| ; case "ą": SendInput, {Backspace}{Text}1 | |
| ; case "Ą": SendInput, {Backspace}{Text}! | |
| ; case "č": SendInput, {Backspace}{Text}2 | |
| ; case "Č": SendInput, {Backspace}{Text}@ | |
| ; case "ę": SendInput, {Backspace}{Text}3 | |
| ; case "Ę": SendInput, {Backspace}{Text}# | |
| ; case "ė": SendInput, {Backspace}{Text}4 | |
| ; case "Ė": SendInput, {Backspace}{Text}$ | |
| ; case "į": SendInput, {Backspace}{Text}5 | |
| ; case "Į": SendInput, {Backspace}{Text}`% | |
| ; case "š": SendInput, {Backspace}{Text}6 | |
| ; case "Š": SendInput, {Backspace}{Text}^ | |
| ; case "ų": SendInput, {Backspace}{Text}7 | |
| ; case "Ų": SendInput, {Backspace}{Text}& | |
| ; case "ū": SendInput, {Backspace}{Text}8 | |
| ; case "Ū": SendInput, {Backspace}{Text}* | |
| ; case "ž": SendInput, {Backspace}{Text}= | |
| ; case "Ž": SendInput, {Backspace}{Text}+ | |
| ; case "1": SendInput, {Backspace}{Text}ą | |
| ; case "!": SendInput, {Backspace}{Text}Ą | |
| ; case "2": SendInput, {Backspace}{Text}č | |
| ; case "@": SendInput, {Backspace}{Text}Č | |
| ; case "3": SendInput, {Backspace}{Text}ę | |
| ; case "#": SendInput, {Backspace}{Text}Ę | |
| ; case "4": SendInput, {Backspace}{Text}ė | |
| ; case "$": SendInput, {Backspace}{Text}Ė | |
| ; case "5": SendInput, {Backspace}{Text}į | |
| ; case "%": SendInput, {Backspace}{Text}Į | |
| ; case "6": SendInput, {Backspace}{Text}š | |
| ; case "^": SendInput, {Backspace}{Text}Š | |
| ; case "7": SendInput, {Backspace}{Text}ų | |
| ; case "&": SendInput, {Backspace}{Text}Ų | |
| ; case "8": SendInput, {Backspace}{Text}ū | |
| ; case "*": SendInput, {Backspace}{Text}Ū | |
| ; case "=": SendInput, {Backspace}{Text}ž | |
| ; case "+": SendInput, {Backspace}{Text}Ž | |
| ; default: Matched := false | |
| ; } | |
| ; if(Matched) { | |
| ; SoundPlay, %A_WinDir%\Media\notify.wav | |
| ; } | |
| ; LastKey := | |
| ; return | |
| ; Right ALT to minimize active window | |
| ; ~RAlt Up::WinMinimize("A") | |
| ; we have to wake the rainmeter skin periodically | |
| ; SetTimer, refresh_rainmeter, 1800000 ; check every 30min one hour = 1000ms x 60s x 60m | |
| ; Return | |
| ; refresh_rainmeter: | |
| ; Run "C:\Apps\Rainmeter\Rainmeter.exe" !Refresh | |
| ; return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ClipBoard = CreateObject("HTMLFile").parentWindow.clipboardData.getData("Text") | |
| Call CreateObject("QTTabBarLib.Scripting").InvokeCommand("NewTab", ClipBoard) |
Author
- install https://www.autohotkey.com/
- download this script
- doubleclick the downloaded
aio.ahk - press
win+wand it should open the wallpaper under mouse - customize this script and head to https://www.autohotkey.com/boards/ for more help and inspiration!
Author
updated to autohotkey v2 with help from https://github.com/mmikeww/AHK-v2-script-converter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
а как этим пользоваться?