Scorputer Posted October 21, 2008 Share Posted October 21, 2008 Hi, I'm trying to use AutoIT to navigate to Youtube.com, open a YouTube video, pause it, make it full screen, then play it. Can someone point me in the right direction as to how I can address the video window? I see things in the AutoIT help file for form objects, but I'm not sure they apply. Gratefully yours, - Scorputer Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 21, 2008 Share Posted October 21, 2008 The youtube player is a flash object. You'd have to use MouseClicks to do the manipulation of the actual player or use Send() for the shortcut keys. Space Pauses/Plays the video when it has the focus. Opening the page is easy just use the _IE* functions. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Scorputer Posted October 21, 2008 Author Share Posted October 21, 2008 The youtube player is a flash object. You'd have to use MouseClicks to do the manipulation of the actual player or use Send() for the shortcut keys. Space Pauses/Plays the video when it has the focus. Opening the page is easy just use the _IE* functions.Thanks for the reply! So, I don't suppose there's a more elegant way of addressing the play button or full screen button as controls? Or is it maybe possible to address the Flash player as an application window (though I currently can't imagine how)?- Scorputer Link to comment Share on other sites More sharing options...
aNewLyfe Posted October 22, 2008 Share Posted October 22, 2008 maybe you can do it with a flash com object. there is example scripts around the forum. if it launchs online videos, u can run it with url that u grabbed from page`s source. then send commands like $oSWF.play, $oSWF.fullscreen = true just an opinion. ~ Every Living Thing is a Code Snippet of World Application ~ Link to comment Share on other sites More sharing options...
Scorputer Posted October 22, 2008 Author Share Posted October 22, 2008 maybe you can do it with a flash com object. there is example scripts around the forum. if it launchs online videos, u can run it with url that u grabbed from page`s source. then send commands like $oSWF.play, $oSWF.fullscreen = true just an opinion. Aha! Thanks for the tip. I found that the following works: ControlClick($iewindow1, "", "[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]", "left", 2, 15, 375) ; toggles Play/Pause to Play .. where $iewindow1 is the name of the IE window. The last three numbers are the number of clicks, and the xy coordinates, provided by the "ControlClick Coords" supplied from the Window Info. I find it odd that I had to list 2 clicks to make the control work, but it works! - Scorputer Link to comment Share on other sites More sharing options...
lintroller Posted March 9, 2009 Share Posted March 9, 2009 Is there any way to have IE open youtube and then mute the sound? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now