有沒有人試圖修復Labview干擾使用Autohotkey的正常Alt-Tab
行爲的方式?使用Autohotkey修復Labview Alt-Tab行爲
Alt-Tab
Labview將所有非labview窗口放到列表的末尾。
所以,如果你剛纔從您的瀏覽器ALT-標籤LabVIEW的窗口,它需要
(2×number_of_currently_open_labview_projects -1)
按鍵回去。
有沒有人試圖修復Labview干擾使用Autohotkey的正常Alt-Tab
行爲的方式?使用Autohotkey修復Labview Alt-Tab行爲
Alt-Tab
Labview將所有非labview窗口放到列表的末尾。
所以,如果你剛纔從您的瀏覽器ALT-標籤LabVIEW的窗口,它需要
(2×number_of_currently_open_labview_projects -1)
按鍵回去。
好主意。我發現這個功能令人討厭,而且在網絡上的任何地方似乎都不是一個簡單的修復方法。這是我的腳本。兩個快速註釋:
注:爲適應此代碼爲各種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}
好開始!儘管如此,它並不能算數。我有一個vi文件打開(這是2個窗口:FP和BD) - 它說我有三個。 –
應該很容易追蹤 - 只需運行一個WinGet,看看有什麼。我通過在WIndow標題中查找vi來算數,但如果您還有其他內容顯示,可以修改代碼。 https://www.autohotkey.com/docs/commands/WinGet.htm – Charlie
在我的實驗中,ahk_class LVDChild被證明是足夠可靠的 –