JOK*_*OKe 45 alt-tab windows-10
我正在寻找一种使用快捷键在同一应用程序的两个打开窗口之间切换的方法,我发现了这个https://neosmart.net/EasySwitch/但它不是开源的,我什至不相信它能工作。有人有替代方案吗?这是 Unity 和 Mac OS 中的 OOTB,Windows 没有它是荒谬的。
前段时间,一位微软员工制作了这个工具:https://switcher.en.softonic.com/不知道官方网站是什么,它很棒,但只能在 Windows 7 上运行,不能在 10 上运行,也不是开源的。
我发现的最接近开源的东西是这个https://github.com/JochenBaier/fastwindowswitcher但不太理想。
有替代方案吗?
Saa*_*arg 42
有三种方法可以做到这一点:
请注意,在第二个和第三个选项中,如果指定了 n,使得该程序的任何窗口都没有打开,则 Windows 将打开一个新窗口。无论该应用程序的窗口是否已打开,也可以通过按Win+ shift+来实现此效果。n
har*_*ymc 42
您可以使用免费的AutoHotkey自行 实现Alt+快捷方式。`
以下脚本将循环浏览活动进程的所有窗口:
!`::
WinGetClass, OldClass, A
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName%
IF WinClassCount = 1
Return
loop, 2 {
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcessName%
WinGetClass, NewClass, A
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass")
break
}
Run Code Online (Sandbox Code Playgroud)
安装完AutoHotKey后,将上述文本放入一个.ahk文件中,双击进行测试。您可以通过右键单击托盘栏中的绿色 H 图标并选择“退出”来停止脚本。要使其在登录时运行,请将其放置在位于 的启动组中
C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup。
有用的 AutoHotkey 文档:
9cc*_*cco 13
我已经更新了 harrymc 的脚本,使其可以在 AutoHotkey v2 中执行:
#Requires AutoHotkey v2.0
!`::{
OldClass := WinGetClass("A")
ActiveProcessName := WinGetProcessName("A")
WinClassCount := WinGetCount("ahk_exe" ActiveProcessName)
IF WinClassCount = 1
Return
loop 2 {
WinMoveBottom("A")
WinActivate("ahk_exe" ActiveProcessName)
NewClass := WinGetClass("A")
if (OldClass != "CabinetWClass" or NewClass = "CabinetWClass")
break
}
}
Run Code Online (Sandbox Code Playgroud)
由此,转换 EugeneK 的脚本也应该很容易。
我也尝试在 v2 中实现 EugeneK 的脚本。我不确定它是否具有所有预期的功能,但它工作正常并且将是我将要使用的
#Requires AutoHotkey v2.0
!`::
{
win_id := WinActive("A")
win_class := WinGetClass("A")
active_process_name := WinGetProcessName("A")
; We have to be extra careful about explorer.exe since that process is responsible for more than file explorer
if (active_process_name = "explorer.exe")
win_list := WinGetList("ahk_exe" active_process_name " ahk_class" win_class)
else
win_list := WinGetList("ahk_exe" active_process_name)
; Calculate index of next window. Since activating a window puts it at the top of the list, we have to take from the bottom.
next_window_i := win_list.Length
next_window_id := win_list[next_window_i]
; Activate the next window and send it to the top.
WinMoveTop("ahk_id" next_window_id)
WinActivate("ahk_id" next_window_id)
}
Run Code Online (Sandbox Code Playgroud)
另外:我喜欢将此功能与Alt + |键绑定在一起。。因此,如果您也更喜欢这个,请更改!'::为!|::.
小智 5
我修改了 ahk 脚本以便进行 Ubuntu 风格切换。按住`某个键时按下alt将循环浏览所有应用程序窗口,将下一个窗口放在顶部,而不是将顶部窗口发送到底部。单个alt + `组合将在最后两个窗口之间循环。
!`::
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, List, ahk_exe %ActiveProcessName%
if (WinClassCount = 1)
return
if (NextWindow = "")
NextWindow := 2
element := % WinClassCount%NextWindow%
WinSet, Top,, ahk_id %element%
WinActivate, ahk_id %element%
NextWindow += 1
if (NextWindow > WinClassCount || !getKeyState("Alt"))
NextWindow := 2
return
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
26556 次 |
| 最近记录: |