这是一个关于 autohotkey 的问题 所以这个脚本应该用这个名字创建一个新文件夹,然后下载一系列视频,然后继续下一个系列的视频并下载它们。这可以制作一系列视频,但随后它会尝试将所有内容放在同一个文件夹中,即变量 P 不会从 72024 增加到 72025,尽管外部循环中有 X := ++P 参数。我在搞砸什么?一组有 15 个视频,我把它分成 3 个循环,这样我就可以插入 30 分钟左右的 %delay% ,让他们有时间下载,而不是过多地敲击 gomtv 网站。这是迄今为止我尝试过的最复杂的脚本,因此欢迎任何建设性的批评。
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
G = 1
H = 1
P = 72024
FolderName = 2013_WCS_KR_Season_1_Code_S_Ro32_Group_A_%P%
FileName = %FolderName%_Set
W = http://www.gomtv.net/2013wcs1/vod/%P%
URL = http://www.gomtv.net/2013wcs1/vod/%P%/?set=
NumberSets = 15
wTitle = vlcrip
Q = .mp4
Delay = 0
Loop, 2
{
Sleep 3000
WinActivate vlcrip
Send {Lshift down}
Sleep 100
Send {F10}
Sleep 100
Send {Lshift up}
Sleep 100
Send w
Sleep 100
Send w
Sleep 100
Send {Enter}
Sleep 100
Send {Enter}
Sleep 100
Send %FolderName%
Send {Enter}
Sleep 100
Send {Lshift down}
Sleep 100
Send {F10}
Sleep 100
Send {Lshift up}
Sleep 100
Send e
Sleep 100
WinActivate %FolderName%
Loop, 1
{
sleep 100
Send {Lshift down}
Sleep 100
Send {F10}
Sleep 100
Send {Lshift up}
Sleep 100
Send w
Send {Enter}
sleep 100
send livestreamer %URL%%H% best -o %FileName%_%H%%Q%
sleep 100
T := ++H
sleep 100
Send {Enter}
Sleep 200
WinActivate %FolderName%
Sleep 200
}
sleep %Delay%
Loop, 1
{
sleep 100
Send {Lshift down}
Sleep 100
Send {F10}
Sleep 100
Send {Lshift up}
Sleep 100
Send w
Send {Enter}
sleep 100
send livestreamer %URL%%H% best -o %FileName%_%H%%Q%
sleep 100
T := ++H
sleep 100
Send {Enter}
Sleep 200
WinActivate %FolderName%
Sleep 200
}
sleep %Delay%
Loop, 1
{
sleep 100
Send {Lshift down}
Sleep 100
Send {F10}
Sleep 100
Send {Lshift up}
Sleep 100
Send w
Send {Enter}
sleep 100
send livestreamer %URL%%H% best -o %FileName%_%H%%Q%
sleep 100
T := ++H
sleep 100
Send {Enter}
Sleep 200
WinActivate %FolderName%
Sleep 200
}
X := ++P
Send {Lcontrol down}
Sleep 100
Send {space}
Sleep 100
Send {Lcontrol up}
Sleep 100
WinActivate vlcrip
Sleep 100
}