; 每隔30分钟,定时自动强制重新启动阿里云盘,防止阿里云盘下载任务长时间停止
; 设置环境变量
#SingleInstance,force
#Persistent
#NoEnv
#WinActivateForce
;~ #NoTrayIcon
;~ #Warn
SetWorkingDir,%A_ScriptDir%
DetectHiddenWindows,On
SetTitleMatchMode,2
; 30分*60秒/分*1000毫秒/秒=1800000
SetTimer,ReStartAliyunDrive,1800000
return
ReStartAliyunDrive()
{
loop,50
{
;等待指定标题窗口出现
; WinWait, 阿里云盘 ahk_class Chrome_WidgetWin_1 ahk_exe aDrive.exe
WinClose, 阿里云盘
WinClose, ahk_exe aDrive.exe
WinKill,阿里云盘
WinKill,ahk_exe aDrive.exe
Process,Close,aDrive.exe
}
Run,C:\Users\Administrator\AppData\local\Programs\aDrive\aDrive.exe,C:\Users\Administrator\AppData\local\Programs\aDrive\
}
标签:exe,aDrive,云盘,30,阿里,ahk From: https://www.cnblogs.com/delphixx/p/17265088.html