diff options
-rw-r--r-- | tt.windowselect.ahk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tt.windowselect.ahk b/tt.windowselect.ahk new file mode 100644 index 0000000..0f975b9 --- /dev/null +++ b/tt.windowselect.ahk @@ -0,0 +1,35 @@ +;; Select window by number ---------------------------------------------------- + +;; -> body + +#1::Taskbar(1) +#2::Taskbar(2) +#3::Taskbar(3) +#4::Taskbar(4) +#5::Taskbar(5) +#6::Taskbar(6) +#7::Taskbar(7) +#8::Taskbar(8) +#9::Taskbar(9) +#0::Taskbar(10) + +;; -> library + +Taskbar(n) +{ + static start := 63 ; set this to your start menu button width + static width := 63 ; set this to your taskbar button width + static offset := 0 ; don't change this + if (offset = 0) + offset := 10 + else + offset := 0 + x := start + width*(n-1) + offset + + tmp := A_CoordModeMouse + CoordMode, Mouse, Screen + MouseGetPos, ox, oy + MouseClick, Left, %x%, %A_ScreenHeight%, 1, 0 + MouseMove, %ox%, %oy%, 0 + CoordMode, Mouse, %tmp% +} |