Skip to content

Instantly share code, notes, and snippets.

@raveren
Last active April 26, 2024 12:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save raveren/bac5196d2063665d2154 to your computer and use it in GitHub Desktop.
Save raveren/bac5196d2063665d2154 to your computer and use it in GitHub Desktop.
My personal autohotkey configuration (used and updated for 10+ years!)
;
; ██╗███╗ ██╗██╗████████╗██╗ █████╗ ██╗ ██╗███████╗███████╗
; ██║████╗ ██║██║╚══██╔══╝██║██╔══██╗██║ ██║╚══███╔╝██╔════╝
; ██║██╔██╗ ██║██║ ██║ ██║███████║██║ ██║ ███╔╝ █████╗
; ██║██║╚██╗██║██║ ██║ ██║██╔══██║██║ ██║ ███╔╝ ██╔══╝
; ██║██║ ╚████║██║ ██║ ██║██║ ██║███████╗██║███████╗███████╗
; ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝
;
; https://gist.github.com/raveren/bac5196d2063665d2154/edit
;
; for ASCII art http://patorjk.com/software/taag/#f=ANSI%20Shadow
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#NoTrayIcon
#SingleInstance Force
SetTitleMatchMode(2) ; 2 = A window's title can contain WinTitle anywhere inside it to be a match.
#Requires AutoHotkey v2.0
;; 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%"
; ██████╗ █████╗ ██╗███╗ ██╗███╗ ███╗███████╗████████╗███████╗██████╗
; ██╔══██╗██╔══██╗██║████╗ ██║████╗ ████║██╔════╝╚══██╔══╝██╔════╝██╔══██╗
; ██████╔╝███████║██║██╔██╗ ██║██╔████╔██║█████╗ ██║ █████╗ ██████╔╝
; ██╔══██╗██╔══██║██║██║╚██╗██║██║╚██╔╝██║██╔══╝ ██║ ██╔══╝ ██╔══██╗
; ██║ ██║██║ ██║██║██║ ╚████║██║ ╚═╝ ██║███████╗ ██║ ███████╗██║ ██║
; ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
; SetNumLockState("AlwaysOff")
; these are temporarily disabled while I'm on a laptop without numpad
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}")
+^F8::
{ ; ctrl+shift+F8 = Auto-click
static AutoClickerOn := False
if AutoClickerOn := !AutoClickerOn
SetTimer(Click, 40), Click(), SoundBeep(1500)
Else SetTimer(Click, 0), SoundBeep(1000)
}
; ███████╗██████╗ ██████╗ ████████╗██╗███████╗██╗ ██╗
; ██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║██╔════╝╚██╗ ██╔╝
; ███████╗██████╔╝██║ ██║ ██║ ██║█████╗ ╚████╔╝
; ╚════██║██╔═══╝ ██║ ██║ ██║ ██║██╔══╝ ╚██╔╝
; ███████║██║ ╚██████╔╝ ██║ ██║██║ ██║
; ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
; 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
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██████╗ ██╗██╗ ██╗
; ██║ ██║██║████╗ ██║ ██║ ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██╔════╝ ██╔╝██║ ██║
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ ██╔╝ ██║ ██║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║ ██╔╝ ╚██╗ ██╔╝
; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║██║ ██║██║██║ ██║ ██║ ╚██████╗██╔╝ ╚████╔╝
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═══╝
; 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")
; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗
; ██║ ██║██║████╗ ██║ ██║ ██║ ██║
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ █╗ ██║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║███╗██║
; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚███╔███╔╝
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══╝╚══╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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::
{
ErrorLevel := ProcessExist("slack.exe")
slackPid := ErrorLevel
if !WinExist("ahk_pid " slackPid)
{
Run(A_AppData "\..\Local\slack\slack.exe")
}
else
{
if WinActive("ahk_pid " slackPid)
{
WinClose("ahk_pid " slackPid)
} else {
WinActivate("ahk_pid " slackPid)
}
}
}
; ██████╗ █████╗ ██████╗ ███████╗██╗ ██████╗ ██████╗██╗ ██╗
;██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██╔═══██╗██╔════╝██║ ██╔╝
;██║ ███████║██████╔╝███████╗██║ ██║ ██║██║ █████╔╝
;██║ ██╔══██║██╔═══╝ ╚════██║██║ ██║ ██║██║ ██╔═██╗
;╚██████╗██║ ██║██║ ███████║███████╗╚██████╔╝╚██████╗██║ ██╗
; ╚═════╝╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Capslock toggles between browser and PHPStorm.
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"
; ListVars
; Pause
; in autohotkey v1 this is the only way I found to call WinActivate w/ variable:
; WinActivate % browser
if ( WinActive( secondary_browser ) )
{
WinActivate(browser)
; if ( WinExist( editor ) ) {
; WinActivate % editor
; } else {
; WinActivate % browser
; }
} else {
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" ;
}
} 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")
if WinExist("sage sync") {
WinActivate
Send("{F5}")
Sleep(100)
Send("{F6}")
}
; WinActivate ahk_exe chrome.exe
WinActivate("ahk_exe firefox.exe")
SendInput("{F5}")
}
; taskkill /IM phpstorm64.exe /F
NumLock::SendInput("{Ctrl down}9{Ctrl up}")
+VK34::
{
; Switches the active window's keyboard layout/language to English (US) on typing a Lithuanian symbol
SendInput("{$}")
Sleep(1)
PostMessage 0x0050, 0, 0x4090409,, "A"
}
; ė::
; SC005::
; {
; SendInput, {Alt down}{shift}{Alt up}
; SendInput, $
; Return
; }
; SC278::Send $
; Holding left mouse button and pressing right send ctrl+b
; ~RButton & MButton::SendInput {F7}
~LButton & RButton::^b
~RButton & LButton::SendInput("{F7}")
~LButton & XButton1::SendInput("{F7}")
~LButton & XButton2::SendInput("{F7}")
!F4::!F3
; disable alt acceleration
~LAlt::Send("{Blind}{vkE8}")
; RButton & WheelDown::MsgBox You turned the mouse wheel down while holding down the middle button.
#HotIf
#HotIf WinActive("ahk_exe firefox.exe", )
F10::
{
WinActivate("ahk_exe phpstorm64.exe")
SendInput("{F10}")
}
#HotIf
; ██████╗ ██████╗ ████████╗███████╗ ██████╗
; ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔════╝
; ██████╔╝██████╔╝ ██║ ███████╗██║
; ██╔═══╝ ██╔══██╗ ██║ ╚════██║██║
; ██║ ██║ ██║ ██║ ███████║╚██████╗
; ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝
;
; replace PrintScreen with the superior Win10 Snip&Sketch
PrintScreen::+#S
; ███████╗██╗ ██╗██╗███████╗████████╗ ██╗ ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗
; ██╔════╝██║ ██║██║██╔════╝╚══██╔══╝ ██║ ██║ ██║██║████╗ ██║ ██║ ██║
; ███████╗███████║██║█████╗ ██║ ████████████╗ ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║
; ╚════██║██╔══██║██║██╔══╝ ██║ ╚════██╔════╝ ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║
; ███████║██║ ██║██║██║ ██║ ██║ ╚███╔███╔╝██║██║ ╚████║ ██║ ███████╗
; ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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")
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗
; ██║ ██║██║████╗ ██║ ██║ ██╔════╝
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████╗
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚════██║
; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████║
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+S is sublime text
#s::
{
if WinExist("ahk_exe sublime_text.exe")
WinActivate()
else
Run("C:\apps\SublimeText\sublime_text.exe")
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ██████╗
; ██║ ██║██║████╗ ██║ ██║ ██╔═══██╗
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ ██║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║▄▄ ██║
; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚██████╔╝
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══▀▀═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+q is chrome
#q::
{
if WinExist("Google Chrome") {
WinActivate()
} else {
Run("chrome")
WinWait("Google Chrome")
WinActivate()
}
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗
; ██║ ██║██║████╗ ██║ ██║ ╚██╗██╔╝
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ╚███╔╝
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██╔██╗
; ╚███╔███╔╝██║██║ ╚████║ ██║ ██╔╝ ██╗
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+X is play media
#x::
{
Send("{Media_Play_Pause}")
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ███████╗
; ██║ ██║██║████╗ ██║ ██║ ╚══███╔╝
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███╔╝
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ███╔╝
; ╚███╔███╔╝██║██║ ╚████║ ██║ ███████╗
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+Z previous track
#z:: ;the + means shift
{
Send("{Media_Prev}")
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ██╗ ██╗
; ██║ ██║██║████╗ ██║ ██║ ██║ ██║
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║ ██║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ╚██╗ ██╔╝
; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚████╔╝
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═══╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+V next track
#v::
{
Send("{Media_Next}")
}
; ██╗ ██╗██╗███╗ ██╗ ██╗ ██████╗
; ██║ ██║██║████╗ ██║ ██║ ██╔════╝
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ██║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██║
; ╚███╔███╔╝██║██║ ╚████║ ██║ ╚██████╗
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+C opens shell in current 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 existing 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")
SendInput(CurrentDateTime)
}
;████████╗███████╗██╗ ██╗████████╗
;╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝
; ██║ █████╗ ╚███╔╝ ██║
; ██║ ██╔══╝ ██╔██╗ ██║
; ██║ ███████╗██╔╝ ██╗ ██║
; ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; TYPE ";eur" to replace it with €. This file must be saved in UTF8 with BOM for this to work:
:?:;eur::€
; ██╗ ██╗███████╗██╗ ██████╗ ███████╗██████╗ ███████╗
; ██║ ██║██╔════╝██║ ██╔══██╗██╔════╝██╔══██╗██╔════╝
; ███████║█████╗ ██║ ██████╔╝█████╗ ██████╔╝███████╗
; ██╔══██║██╔══╝ ██║ ██╔═══╝ ██╔══╝ ██╔══██╗╚════██║
; ██║ ██║███████╗███████╗██║ ███████╗██║ ██║███████║
; ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
getPathFromActiveWindow()
{
if ( WinActive("ahk_exe explorer.exe") ) {
ActiveExplorer := WinActive("ahk_exe explorer.exe")
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, "\", "/")
}
; 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]
; 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, "/", "\")
}
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) {
; todo test with 3+ monitors and remove this `if`
if(A_Index = 1)
{
return 0
} else {
return 4
}
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)
}
; Msgbox(RegPath)
;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")
}
~MButton & LButton::
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
}
}
;██████╗ ██╗███████╗ █████╗ ██████╗ ██╗ ███████╗██████╗
;██╔══██╗██║██╔════╝██╔══██╗██╔══██╗██║ ██╔════╝██╔══██╗
;██║ ██║██║███████╗███████║██████╔╝██║ █████╗ ██║ ██║
;██║ ██║██║╚════██║██╔══██║██╔══██╗██║ ██╔══╝ ██║ ██║
;██████╔╝██║███████║██║ ██║██████╔╝███████╗███████╗██████╔╝
;╚═════╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝╚═════╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Ctrl+z to toggle autoclicker
; #MaxThreadsPerHotkey 3
; ^z::
; Toggle := !Toggle
; Loop
; {
; if (!Toggle)
; Break
; ; Send, {e down}
; ; Sleep 10
; ; Send, {e up}
; Click
; ; Sleep 10 ; Make this number higher for slower clicks, lower for faster.
; }
; Input, OutputVar, L1 M
; MsgBox, %OutputVar%
; if (OutputVar = "Ė")
; MsgBox, You pressed Control-C.
; ExitApp
; ██╗ ██╗██╗███╗ ██╗ ██╗ █████╗
; ██║ ██║██║████╗ ██║ ██║ ██╔══██╗
; ██║ █╗ ██║██║██╔██╗ ██║ ████████████╗ ███████║
; ██║███╗██║██║██║╚██╗██║ ╚════██╔════╝ ██╔══██║
; ╚███╔███╔╝██║██║ ╚████║ ██║ ██║ ██║
; ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WIN+A: Aimp
; #a::
; {
; app := "ahk_exe aimp.exe"
; if ( WinActive( app ) )
; {
; ; Minimize
; } else {
; Run("C:\apps\AIMP\AIMP.exe")
; }
; }
; AutoClickerOn := 0
; F8::{
; global AutoClickerOn
; if (AutoClickerOn = 0) {
; AutoClickerOn := 1
; } else {
; AutoClickerOn := 0
; }
; While AutoClickerOn{
; ; Click()
; Send("a")
; Sleep(40)
; }
; }
; ~^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
ClipBoard = CreateObject("HTMLFile").parentWindow.clipboardData.getData("Text")
Call CreateObject("QTTabBarLib.Scripting").InvokeCommand("NewTab", ClipBoard)
@fedsumk
Copy link

fedsumk commented Jan 12, 2022

а как этим пользоваться?

@raveren
Copy link
Author

raveren commented Jan 13, 2022

@fedsumk

  1. install https://www.autohotkey.com/
  2. download this script
  3. doubleclick the downloaded aio.ahk
  4. press win+w and it should open the wallpaper under mouse
  5. customize this script and head to https://www.autohotkey.com/boards/ for more help and inspiration!

@raveren
Copy link
Author

raveren commented Aug 14, 2023

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