aa2zz6 24 Posted January 9, 2016 I was looking at using a control click to click on the video when the mouse is inactive for a period of time. The control click doesn't seem to pause the videos. I'll provide the AutoIt V3 Window Info.png below. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <GDIPlus.au3> HotKeySet("{ESC}", "Terminate") $width = 800 $height = 625 $hMain = GUICreate("YouTube", 800, 585, @DesktopWidth / 2 - $width / 2, @DesktopHeight / 2 - $height / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $wPos = WinGetPos($hMain) GUISetState(@SW_SHOW) Local $oIE = _IECreateEmbedded() GUICtrlCreateObj($oIE, 0, 0, $width + 0, $height + 0) _IENavigate($oIE, "https://www.youtube.com/") ; Copy the login link here. $begin = TimerInit() While 1 $moved = "no" $pos1 = MouseGetPos() Sleep(50) $pos2 = MouseGetPos() If $pos1[0] <> $pos2[0] Then $moved = "yes" If $pos1[1] <> $pos2[1] Then $moved = "yes" If $moved = "yes" Then $begin = TimerInit() EndIf If TimerDiff($begin) > 10000 And $moved = "no" Then ControlClick("[CLASS:Internet Explorer_Server]", "", "left", 1, 335, 213) $begin = TimerInit() EndIf WEnd Func Terminate() Exit EndFunc ;==>Terminate Share this post Link to post Share on other sites
InunoTaishou 191 Posted January 9, 2016 (edited) ControlClick($hMain, "", "", "Left", 1, 50, 400)Worked fine for me using your example. As didControlSend($hMain, "", "", "{Space}")(If the youtube video is the active object)Also, check out https://www.autoitscript.com/autoit3/docs/libfunctions/_Timer_GetIdleTime.htm instead of using your own timer, it might be a little simpler and cleaner Edited January 9, 2016 by InunoTaishou 1 aa2zz6 reacted to this Share this post Link to post Share on other sites
aa2zz6 24 Posted January 9, 2016 Thank you, InunoTaishou. Share this post Link to post Share on other sites