#include #include #include #include #include #include #include "ImageSearch.au3" AutoItSetOption('MouseCoordMode', 0) HotKeySet("/", "NetFlix") HotKeySet("`", "_Terminate") Global $SleepFast = 500, $SleepNormal = 1000, $Sleepsec =1000, $Sec = 1000, $Min = 60000, $Hour = 360000 Local $NetFlix, $NetFlix_X, $NetFlix_Y Local $NO_ExitX, $NO_ExitY, $Image =1, $Image_Dowhile_Loop_Break =0 While 1 NetFlix() WEnd Func NetFlix() Switch $Image Case 1 sleep(100) Do Local $NetFlix = _ImageSearch('NetFlix_Image_1920\NetFlix.png', 1, $NetFlix_X, $NetFlix_Y, 100) If $NetFlix = 1 Then MouseMove($NetFlix_X, $NetFlix_Y, 2) MouseClick("left", $NetFlix_X, $NetFlix_Y, 1) sleep($SleepNormal) $Image = $Image + 1 $Image_Dowhile_Loop_Break = 0 Else ;Send("{ESC}")) sleep($SleepFast) ;MsgBox($MB_SYSTEMMODAL, "Title", "Exit Not Found ", 1) $Image_Dowhile_Loop_Break = $Image_Dowhile_Loop_Break + 1 EndIf Until $NetFlix = 1 Or $Image_Dowhile_Loop_Break = 20 If $Image_Dowhile_Loop_Break = 20 Then $Image_Dowhile_Loop_Break = 0 ;MsgBox(0, "Selection" , $Image_Dowhile_Loop_Break & @CRLF & $Image_Dowhile_Loop_Break) $Image = $Image + 1 ;MsgBox(0, "Selection" , $Image_Dowhile_Loop_Break & @CRLF & $Image) Else Sleep(100) EndIf Case 2 MsgBox($MB_SYSTEMMODAL, "Title", "Case 2 Running", 1) $Image = $Image + 1 Case 3 MsgBox($MB_SYSTEMMODAL, "Title", "Case 3 Running", 1) $Image_Dowhile_Loop_Break = $Image_Dowhile_Loop_Break + 1 If $Image_Dowhile_Loop_Break = 5 Then $Image_Dowhile_Loop_Break = 0 ;MsgBox(0, "Selection" , $Image_Dowhile_Loop_Break) Send("{`}") Else Sleep(100) ;MsgBox(0, "Selection" , $Image_Dowhile_Loop_Break) EndIf EndSwitch EndFunc Func _Terminate() MsgBox($MB_SYSTEMMODAL, "", "NetFlix Task Ending", 1) Exit EndFunc ;==>_Terminate