#Include <Array.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$g_szVersion = "我的脚本"
If WinExists($g_szVersion) Then WinKill ($g_szVersion) ; 如果之前已经运行就删除之前那个
AutoItWinSetTitle($g_szVersion)
Local $avArray[19]
$avArray[0] = "240"
$avArray[1] = "255"
$avArray[2] = "270"
$avArray[3] = "300"
$avArray[4] = "315"
$avArray[5] = "330"
$avArray[6] = "345"
$avArray[7] = "360"
$avArray[8] = "375"
$avArray[9] = "390"
$avArray[12] = "305"
$avArray[13] = "320"
$avArray[14] = "335"
$avArray[15] = "350"
$avArray[16] = "365"
$avArray[17] = "380"
$avArray[18] = "395"
Local $avArray1[19]
$avArray1[0] = "今日更新"
$avArray1[1] = "昨日更新"
$avArray1[2] = "一周更新"
$avArray1[3] = "动作片"
$avArray1[4] = "喜剧片"
$avArray1[5] = "恐怖片"
$avArray1[6] = "科幻片"
$avArray1[7] = "战争片"
$avArray1[8] = "动画片"
$avArray1[9] = "爱情片"
$avArray1[10] = "综艺片"
$avArray1[11] = "剧情片"
$avArray1[12] = "连续剧"
$avArray1[13] = "大陆地区"
$avArray1[14] = "港台地区"
$avArray1[15] = "日韩地区"
$avArray1[16] = "欧美地区"
$avArray1[17] = "其他地区"
$avArray1[18] = "高清资源库"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 126, 650, 300, 30)
$Group1 = GUICtrlCreateGroup("", 0, 0, 121, 640)
$Button1 = GUICtrlCreateButton("全选", 1, 600, 30, 30)
$Button2 = GUICtrlCreateButton("取消", 30, 600, 30, 30)
$Button3 = GUICtrlCreateButton("开始", 60, 600, 30, 30)
$Button4 = GUICtrlCreateButton("重起", 90, 600, 30, 30)
$Checkbox1 = GUICtrlCreateCheckbox($avArray1[0], 16, 16, 81, 33)
$Checkbox2 = GUICtrlCreateCheckbox($avArray1[1], 16, 46, 81, 33)
$Checkbox3 = GUICtrlCreateCheckbox($avArray1[2], 16, 76, 81, 33)
$Checkbox4 = GUICtrlCreateCheckbox($avArray1[3], 16, 106, 81, 33)
$Checkbox5 = GUICtrlCreateCheckbox($avArray1[4], 16, 136, 81, 33)
$Checkbox6 = GUICtrlCreateCheckbox($avArray1[5], 16, 166, 81, 33)
$Checkbox7 = GUICtrlCreateCheckbox($avArray1[6], 16, 196, 81, 33)
$Checkbox8 = GUICtrlCreateCheckbox($avArray1[7], 16, 226, 81, 33)
$Checkbox9 = GUICtrlCreateCheckbox($avArray1[8], 16, 256, 81, 33)
$Checkbox10 = GUICtrlCreateCheckbox($avArray1[9], 16, 286, 81, 33)
$Checkbox11 = GUICtrlCreateCheckbox($avArray1[10], 16, 316, 81, 33)
$Checkbox12 = GUICtrlCreateCheckbox($avArray1[11], 16, 346, 81, 33)
$Checkbox13 = GUICtrlCreateCheckbox($avArray1[12], 16, 376, 81, 33)
$Checkbox14 = GUICtrlCreateCheckbox($avArray1[13], 16, 406, 81, 33)
$Checkbox15 = GUICtrlCreateCheckbox($avArray1[14], 16, 436, 81, 33)
$Checkbox16 = GUICtrlCreateCheckbox($avArray1[15], 16, 466, 81, 33)
$Checkbox17 = GUICtrlCreateCheckbox($avArray1[16], 16, 496, 81, 33)
$Checkbox18 = GUICtrlCreateCheckbox($avArray1[17], 16, 526, 81, 33)
$Checkbox19 = GUICtrlCreateCheckbox($avArray1[18], 16, 556, 81, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $Paused
HotKeySet("{PAUSE}", "TogglePause1")
HotKeySet("{ESC}", "Terminate")
;Run ("D:\xbsmov\节目管理器.exe")
$t = "xbs影视系统2010"
$list= "ListView20WndClass2"
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetState($Checkbox1,$GUI_CHECKED)
GUICtrlSetState($Checkbox2,$GUI_CHECKED)
GUICtrlSetState($Checkbox3,$GUI_CHECKED)
GUICtrlSetState($Checkbox4,$GUI_CHECKED)
GUICtrlSetState($Checkbox5,$GUI_CHECKED)
GUICtrlSetState($Checkbox6,$GUI_CHECKED)
GUICtrlSetState($Checkbox7,$GUI_CHECKED)
GUICtrlSetState($Checkbox8,$GUI_CHECKED)
GUICtrlSetState($Checkbox9,$GUI_CHECKED)
GUICtrlSetState($Checkbox10,$GUI_CHECKED)
GUICtrlSetState($Checkbox11,$GUI_CHECKED)
GUICtrlSetState($Checkbox12,$GUI_CHECKED)
GUICtrlSetState($Checkbox13,$GUI_CHECKED)
GUICtrlSetState($Checkbox14,$GUI_CHECKED)
GUICtrlSetState($Checkbox15,$GUI_CHECKED)
GUICtrlSetState($Checkbox16,$GUI_CHECKED)
GUICtrlSetState($Checkbox17,$GUI_CHECKED)
GUICtrlSetState($Checkbox18,$GUI_CHECKED)
GUICtrlSetState($Checkbox19,$GUI_CHECKED)
Case $Button2
GUICtrlSetState($Checkbox1,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox2,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox3,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox4,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox5,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox6,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox7,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox8,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox9,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox10,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox11,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox12,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox13,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox14,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox15,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox16,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox17,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox18,$GUI_UNCHECKED)
GUICtrlSetState($Checkbox19,$GUI_UNCHECKED)
Case $Button3
#cs
$is = GUICtrlRead($Checkbox1)
$is1 = GUICtrlRead($Checkbox2)
$is2 = GUICtrlRead($Checkbox3)
$is3 = GUICtrlRead($Checkbox4)
$is4= GUICtrlRead($Checkbox5)
$is5= GUICtrlRead($Checkbox6)
$is6 = GUICtrlRead($Checkbox7)
$is7 = GUICtrlRead($Checkbox8)
MsgBox (0,"",$is&"and"&$is1&"and"&$is2&"and"&$is3&"and"&$is4)
#ce
;#cs
If GUICtrlRead($Checkbox1) = $GUI_UNCHECKED then
_ArrayDelete($avArray,1)
_ArrayDelete($avArray1,1)
EndIf
If GUICtrlRead($Checkbox2) = $GUI_UNCHECKED then
_ArrayDelete($avArray,2)
_ArrayDelete($avArray1,2)
EndIf
If GUICtrlRead($Checkbox3) = $GUI_UNCHECKED then
_ArrayDelete($avArray,3)
_ArrayDelete($avArray1,3)
EndIf
If GUICtrlRead($Checkbox4) = $GUI_UNCHECKED then
_ArrayDelete($avArray,4)
_ArrayDelete($avArray1,4)
EndIf
If GUICtrlRead($Checkbox5) = $GUI_UNCHECKED then
_ArrayDelete($avArray,5)
_ArrayDelete($avArray1,5)
EndIf
If GUICtrlRead($Checkbox6) = $GUI_UNCHECKED then
_ArrayDelete($avArray,6)
_ArrayDelete($avArray1,6)
EndIf
If GUICtrlRead($Checkbox7) = $GUI_UNCHECKED then
_ArrayDelete($avArray,7)
_ArrayDelete($avArray1,7)
EndIf
If GUICtrlRead($Checkbox8) = $GUI_UNCHECKED then
_ArrayDelete($avArray,8)
_ArrayDelete($avArray1,8)
EndIf
If GUICtrlRead($Checkbox9) = $GUI_UNCHECKED then
_ArrayDelete($avArray,9)
_ArrayDelete($avArray1,9)
EndIf
If GUICtrlRead($Checkbox10) = $GUI_UNCHECKED then
_ArrayDelete($avArray,10)
_ArrayDelete($avArray1,10)
EndIf
If GUICtrlRead($Checkbox11) = $GUI_UNCHECKED then
_ArrayDelete($avArray,11)
_ArrayDelete($avArray1,11)
EndIf
If GUICtrlRead($Checkbox12) = $GUI_UNCHECKED then
_ArrayDelete($avArray,12)
_ArrayDelete($avArray1,12)
EndIf
If GUICtrlRead($Checkbox13) = $GUI_UNCHECKED then
_ArrayDelete($avArray,13)
_ArrayDelete($avArray1,13)
EndIf
If GUICtrlRead($Checkbox14) = $GUI_UNCHECKED then
_ArrayDelete($avArray,14)
_ArrayDelete($avArray1,14)
EndIf
If GUICtrlRead($Checkbox15) = $GUI_UNCHECKED then
_ArrayDelete($avArray,15)
_ArrayDelete($avArray1,15)
EndIf
If GUICtrlRead($Checkbox16) = $GUI_UNCHECKED then
_ArrayDelete($avArray,16)
_ArrayDelete($avArray1,16)
EndIf
If GUICtrlRead($Checkbox17) = $GUI_UNCHECKED then
_ArrayDelete($avArray,1)
_ArrayDelete($avArray1,1)
EndIf
If GUICtrlRead($Checkbox18) = $GUI_UNCHECKED then
_ArrayDelete($avArray,1)
_ArrayDelete($avArray1,1)
EndIf
If GUICtrlRead($Checkbox19) = $GUI_UNCHECKED then
_ArrayDelete($avArray,1)
_ArrayDelete($avArray1,1)
EndIf
;#ce
;_ArrayDisplay($avArray1,"你要下载的电影")
Sleep(1000)
WinActivate ($t)
MouseClick("left",50, 177)
For $i = 0 To UBound($avArray)
Sleep(500)
MouseClick("left",100, $avArray[$i])
Sleep(2000)
Down()
Next
Case $Button4
TogglePause1()
EndSwitch
WEnd
Func Down()
ControlClick ($t,"",$list,"")
For $i = 0 to 60
WinActivate ($t)
WinClose ("提示","确定")
WinClose ("电影批量操作辅助工具","清理残留")
WinClose ("下载电影--电影信息","显示图片>>")
ControlListView ($t, "", $list, "SelectClear")
ControlListView ($t, "", $list, "Select",$i)
;Sleep (500)
;ControlClick($t,"","ThunderRT6FormDC","","",180,135)
MouseClick("left",170,140)
;Sleep (500)
;ControlClick($t,"","ThunderRT6FormDC","","",200,205)
MouseClick("left",200,210)
Sleep (5000)
Next
Send ("{F9}")
Sleep (1000)
Send ("{SPACE}")
Sleep (10000)
EndFunc
Func TogglePause1()
run(@AutoItExe)
;exit;可以不用自己退出,后来运行的会把本进程关闭的,为了安全起见还是加上吧
EndFunc
#cs
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('脚本已被“暂停”',0,0)
WEnd
ToolTip("")
EndFunc
#ce
Func Terminate()
Exit 0
EndFunc