sleep, 900000
run, "C:\Users\Administrator\Desktop\shortcut\06_start_1.bat"
sleep, 180000
close1("BaseGui")
sleep, 1000
close1("JTKWnd") ;关闭360wifi的界面
sleep, 1000
hide_exe1("cacher.exe")
sleep,1000
hide_exe1("excel.exe")
sleep, 15000
#IfWinNotActive ahk_class QQBrowser_WidgetWin_1
a := hyf_getMainIDOfProcess("Ahk_class QQBrowser_WidgetWin_1")
;msgbox %a%
WinActivate Ahk_id %a%
#IfWinNotActive
;func------------------------
close1(Win1){
#IfWinNotActive ahk_class Win1
a := hyf_getMainIDOfProcess("Ahk_class "Win1)
;msgbox %a%
WinActivate Ahk_id %a%
sleep, 500
send, {altdown}{f4}{altup}
#IfWinNotActive
}
hide_exe1(a1){
WinActivate ahk_exe %a1%
; WinWaitActive ahk_exe n
#ifwinactive ahk_exe a1
send, #+z
#ifwinactive
}
hyf_getMainIDOfProcess(Win) ;获取类似chrome等多进程的主程序ID {{{3
{ ;Win为完整类名, v为判断的值,tp为v的类型
DetectHiddenWindows, On
If InStr(Win, "Ahk_class")
RegExMatch(Win, "i)Ahk_class\s\S+", WinTitle)
Else If InStr(Win, "Ahk_exe")
RegExMatch(Win, "i)Ahk_exe\s\S+", WinTitle)
If !(Win ~= "i)^ahk_")
RegExMatch(Win, "i)\S+", TitleMatch)
WinGet, Arr, List, %WinTitle%
;str := ",Default IME,MSCTFIME UI,关闭标签页,nsAppShell:EventWindow" ;排除标题列表 todo 待完善
Loop,% Arr
{
n := Arr%A_Index%
;If (hyf_winGet("MinMax", "Ahk_id " . n) = 0) ;跳过不是最大化也不是最小化的
WinGetTitle, TitleLoop, Ahk_id %n%
If (TitleLoop = "") || (TitleMatch && (TitleLoop != TitleMatch))
Continue
Return n
}
Return 0
}