;~ 每隔30天备份1次百度网盘中的文件到文件服务器
;~ 由于 天翼云盘 只能只读打开文档 所以只好用 百度网盘了
#SingleInstance,force
#NoEnv
#Persistent ;让脚本持久运行(即直到用户关闭或遇到 ExitApp)。
#WinActivateForce
;~ #NoTrayIcon
SetWorkingDir,%A_ScriptDir%
DetectHiddenWindows,On
SetTitleMatchMode,2
;~ SetBatchLines,
;~ SetKeyDelay,
;~ SetWinDelay,
;~ SetControlDelay,
CoordMode,Mouse,Screen
CoordMode,Pixel,Screen
CoordMode,ToolTip,Screen
ListLines,Off
SendMode,Input
SetBatchLines,-1
SetStoreCapsLockMode, On
BackupBaiduNetdisk()
SetTimer,BackupBaiduNetdisk,2592000000
Hotkey,F9,BackupBaiduNetdisk
return
BackupBaiduNetdisk()
{
Sleep,1000
WinActivate,欢迎使用百度网盘 ahk_class DuiHostWnd
Sleep,1000
WinWaitActive,欢迎使用百度网盘 ahk_class DuiHostWnd
Sleep,1000
ControlClick, x223 y45, 欢迎使用百度网盘 ahk_class DuiHostWnd,
Sleep,1000
ControlClick, x570 y385, 欢迎使用百度网盘 ahk_class DuiHostWnd
Sleep,1000
loop,10
{
Sleep,100
Send,^a
}
Sleep,1000
loop,10
{
Sleep,100
Send,^c
}
FileCreateDir,D:\BaiduNetdiskBackupFiles\%A_Year%\%A_MM%\%A_DD%
Run,D:\BaiduNetdiskBackupFiles\%A_Year%\%A_MM%\%A_DD%
;~ win10
;~ WinWaitActive,ahk_class CabinetWClass, UIRibbonWo
Sleep,1000
loop,20
{
Sleep,10
Send,^v
}
}
标签:文件,百度网,ahk,30,DuiHostWnd,Sleep,class,1000
来源: https://www.cnblogs.com/delphixx/p/10989039.html