使用Autohotkey修复Labview Alt-Tab行为

时间:2015-06-01 10:00:54

标签: autohotkey labview alt-tab

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

Labview中的

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

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

(2× number_of_currently_open_labview_projects -1)

要回来的按键。

2 个答案:

答案 0 :(得分:1)

好主意。我觉得这个功能很烦人,并且在网络上的任何地方都没有这么简单。这是我的剧本。两个快速说明:

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

注意:为各种Windows调整此代码 - 查看" ahk_class"使用AutoHotkey installer 中包含的Window Spy工具。

代码

#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}

答案 1 :(得分:0)

我最近发现了一个article与此问题有关,但遗憾的是它是俄语。

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