2015-06-01 102 views
2

有沒有人試圖修復Labview干擾使用Autohotkey的正常Alt-Tab行爲的方式?使用Autohotkey修復Labview Alt-Tab行爲

Alt-Tab Labview將所有非labview窗口放到列表的末尾。

所以,如果你剛纔從您的瀏覽器ALT-標籤LabVIEW的窗口,它需要

(2×number_of_currently_open_labview_projects -1)

按鍵回去。

回答

1

好主意。我發現這個功能令人討厭,而且在網絡上的任何地方似乎都不是一個簡單的修復方法。這是我的腳本。兩個快速註釋:

  • 我有很多麻煩重新映射Alt-Tab。如果這很關鍵,你可以嘗試從here尋求幫助。
  • 據我所知,擺脫「屏幕閃爍」是不可能的,因爲Windows在擊鍵之間需要一些延遲。

注:爲適應此代碼爲各種Windows - 查找「ahk_class」使用包含在AutoHotkey的installer窗口間諜工具。

代碼

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

好開始!儘管如此,它並不能算數。我有一個vi文件打開(這是2個窗口:FP和BD) - 它說我有三個。 –

+0

應該很容易追蹤 - 只需運行一個WinGet,看看有什麼。我通過在WIndow標題中查找vi來算數,但如果您還有其他內容顯示,可以修改代碼。 https://www.autohotkey.com/docs/commands/WinGet.htm – Charlie

+0

在我的實驗中,ahk_class LVDChild被證明是足夠可靠的 –

0

我最近發現了有關這一問題的article,但不幸的是俄語。

它使用python腳本(+ autohotkey映射)引用以下blog,該腳本似乎解決了沒有「屏幕閃爍」的問題。