2

Alt-Tab有没有人尝试修复 Labview使用 Autohotkey干扰正常行为的方式?

Alt-Tab在 Labview 内部将所有非 labview 窗口放在列表的末尾。

因此,如果您刚刚从浏览器中选择了 alt-tabbed 到 labview 窗口,则需要

(2 × number_of_currently_open_labview_projects -1)

击键返回。

4

2 回答 2

1

很好的主意。我发现这个功能很烦人,而且在网络上的任何地方似乎都没有一个简单的修复方法。这是我的脚本。两个快速说明:

  • 我在重新映射 Alt-Tab 时遇到了很多麻烦。如果这很重要,您可以尝试从这里开始寻求帮助。
  • 据我所知,不可能摆脱“屏幕闪烁”,因为 Windows 需要在击键之间有一些延迟。

注意:要使此代码适用于各种 Windows - 使用 AutoHotkey安装程序中包含的 Window Spy 工具查找“ahk_class” 。

代码

#NoEnv  ; Recommended for performance and compatibility with future 
AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#NoTrayIcon 
#SingleInstance force

SetTitleMatchMode 2 ;partial search mode
#IfWinActive vi
#q:: ;there were issues mapping to Alt+Tab

CountOfVIs := -1
WinGet, id, list,ahk_class LVDChild,, Program Manager
Loop, %id%
{
CountOfVIs := CountOfVIs +1
}

msgbox, # of VIs open: %CountOfVIs% ;when I remove this it doesn't work - must be an AHK thing

Send {Alt down}
Loop,%CountOfVIs%
{
Send {tab}
Sleep,50 ;if this is too low it doesn't work
} 
Send {Alt up}
于 2015-06-11T15:55:06.073 回答
0

我最近发现了一篇与此问题相关的文章,但不幸的是它是俄语的。

它使用 python 脚本(+autohotkey 映射)引用了以下博客,该脚本似乎可以在没有“屏幕闪烁”的情况下解决问题。

于 2015-06-26T05:15:09.603 回答