From d4f1caaab6439b8b1b20244cf5a005b8d4616f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 19 Apr 2021 19:16:05 +0200 Subject: Re-write and re-add tt.windowselect.ahk This Windows 7 variant just clicks the relevant taskbar buttons. I made this in order to circumvent an issue I had with 7+ Taskbar Tweaker, where an option that changes the left-click behavior of taskbar buttons didn't apply when using the shortcut keys (Win-n). --- tt.windowselect.ahk | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tt.windowselect.ahk 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% +} -- cgit v1.2.3