admin管理员组文章数量:1516870
Dividend = -1
;############################################
#F8::
class1 = BaiduPlayer_MainDlg
class2 = PPLiveGUI
class3 = Baofeng_StormPlayer
class4 = #32770 ;PPS
;title2 =
Dividend += 1
SwitchWinT(Dividend,4,0)
return
;############################################
SwitchWinT(Dividend,classNo,titleNo)
{
global class1,class2,class3,class4,class5,title1,title2,title3,title4
;; The last activated window
;static active_last
global active_last
WinGet, active_ltemp, ID, A
; Scan program manager
WinGet, id, list,,, Program Manager
idFind = 0
Loop, %id%
{
this_id := id%A_Index%
WinGetClass, this_class, ahk_id %this_id%
Loop %classNo%
{
classCompare := class%A_Index%
if this_class = %classCompare%
{
idFind := idFind +1
idFind%idFind% := this_id
}
}
WinGetTitle, this_title, ahk_id %this_id%
Loop %titleNo%
{
titleCompare := title%A_Index%
IfInString, this_title, %titleCompare%
{
idFind := idFind +1
idFind%idFind% := this_id
}
}
}
; Sort idFind array
Loop %idFind% ;copy the array into a single variable
List.=(A_Index<>1) ? "|" idFind%A_Index% : idFind%A_Index%
Sort, List, N D| ;sort them
StringSplit, idFind, List, | ;put them back into the array
;msgbox,idFind:%idFind%`nList:%List%`nidFind1:%idFind1%`nidFind2:%idFind2%`nidFind3:%idFind3%
; Activate the window upon sorted list
Transform, rnd, Mod, Dividend, idFind
rnd +=1
active_ID := idFind%rnd%
IfWinNotActive ahk_id %active_ID%
{
;msgbox,%active_ID%`nrnd:%rnd%
;WinGet, active_last, ID, A
WinActivate ahk_id %active_ID%
}
Else
{
Dividend += 1
Transform, rnd, Mod, Dividend, idFind
rnd +=1
active_ID := idFind%rnd%
;msgbox,%active_ID%`nrnd:%rnd%
;WinGet, active_last, ID, A
WinActivate ahk_id %active_ID%
}
active_flag = 0
Loop %idFind%
{
If idFind%A_Index% = %active_ltemp%
active_flag = 1
}
;WinGet, active_current, ID, A
;If active_current != %active_ltemp%
If active_flag = 0
active_last := active_ltemp
;List =
class1 =
class2 =
class3 =
class4 =
class5 =
title1 =
title2 =
title3 =
title4 =
}
版权声明:本文标题:超实用指南:定制你的快捷键,快速在Adobe Flash Player窗口间跳跃 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1770750294a3258116.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论