Skip to content

Instantly share code, notes, and snippets.

@askmrsinh
Last active January 17, 2023 14:42
Show Gist options
  • Save askmrsinh/b8023d4e5c7871d729dee705ad604b94 to your computer and use it in GitHub Desktop.
Save askmrsinh/b8023d4e5c7871d729dee705ad604b94 to your computer and use it in GitHub Desktop.
AutoHot Key scripts for windows.
# Keep an application window Always On Top of other windows
# Press `Ctrl+Space' on active application window to activate
!SPACE:: Winset, Alwaysontop, , A

Some useful AutoHot Key scripts

  • alwaysOnTop.ahk
    Keep an application window Always On Top of other windows
  • hotCorner.ahk
    Acticate Task View when mouse points to top left corner of the display
#Persistent
SetTimer, HotCorners, 0
return
#Acticate Task View when mouse points to top left corner of the display
HotCorners:
CoordMode, Mouse, Screen
WinGetPos, X, Y, Xmax, Ymax, Program Manager ; get desktop size
T = 5 ; adjust tolerance value if desired
MouseGetPos, MouseX, MouseY
Xcenter := Xmax/2
Ycenter := Ymax/2
CornerTopLeft := (MouseY < T and MouseX < T)
CornerTopRight := (MouseY < T and MouseX > Xmax - T)
CornerBottomLeft := (MouseY > Ymax - T and MouseX < T)
CornerBottomRight := (MouseY > Ymax - T and MouseX > Xmax - T)
if CornerTopLeft
{
Send, {LWin down}{tab down}
Send, {LWin up}{tab up}
Sleep, 1000
}
; else if CornerTopLeft
; {
; MouseMove, Xcenter, Ycenter
; do sth
; }
; ...
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment