kvakulo / Switcheroo

The humble incremental-search task switcher for Windows
www.switcheroo.io
GNU General Public License v3.0
778 stars 121 forks source link

Switcheroo would be perfect for me with these four features (which I've put into an AutoHotKey script) #166

Open robertalanbevan opened 1 year ago

robertalanbevan commented 1 year ago

I use Switcheroo for its visual clarity rather than for its typing-focused design. This little script is unbelievably useful to that end.

  1. Single-leftclick enters the cursor-selected window (normally, it requires a double-click).
  2. Mousewheel scroll cycles your selection up and down through the list of windows.
  3. Middle click closes the highlighted window (selected by mousewheel or tab, not by cursor).
  4. Letting go of alt automatically opens the selected window, like in normal alt-tabbing.

{
    #IfWinExist ahk_exe switcheroo.exe

    ~LButton::
    SendInput, {LButton Down}
    return

    !MButton::
    Send ^w
    return

    !Alt Up::
    SendInput {Enter Up}
    return

    !WheelDown::
    SendInput {down}
    return

    !WheelUp::
    SendInput {up}
    return

    #IfWinExist
}
nilsandrey commented 1 year ago

Cool, this is a variant with a selection of those (LButton and Wheel) working for AHK v2:

#HotIf WinActive("ahk_exe switcheroo.exe")
~LButton::
{
    SendInput "{LButton Down}"
}

!WheelDown::
{
    SendInput "{down}"
}

!WheelUp::
{
    SendInput "{up}"
}
#HotIf
ShenDongge commented 8 months ago

我使用 Switcheroo 是因为它的视觉清晰度,而不是它以打字为中心的设计。这个小脚本对此非常有用。

  1. 单击左键进入光标选择的窗口(通常,它需要双击)。
  2. 鼠标滚轮滚动在窗口列表中上下循环您的选择。
  3. 中键单击可关闭突出显示的窗口(通过鼠标滚轮或 Tab 键选择,而不是通过光标选择)。
  4. 松开 alt 会自动打开所选窗口,就像在普通的 Alt-Tab 键中一样。
{
    #IfWinExist ahk_exe switcheroo.exe

  ~LButton::
  SendInput, {LButton Down}
  return

  !MButton::
  Send ^w
  return

  !Alt Up::
  SendInput {Enter Up}
  return

  !WheelDown::
  SendInput {down}
  return

  !WheelUp::
  SendInput {up}
  return

    #IfWinExist
}

I don't understand this aspect of the code, and I want a few functions, can you tell me how to operate?