Scorputer Posted October 28, 2008 Share Posted October 28, 2008 Hello, I'm writing some code to load a page with a flash video, Youtube in this case... $oIE1 = _IECreate (") $tYTPageLoadBegin = _Date_Time_GetSystemTime() ; Timestamp for beginning for YouTube page load $filecontents = $filecontents&"YT Pageload Begin = "&_Date_Time_SystemTimeToDateTimeStr($tYTPageLoadBegin)&@CRLF $check = _IELoadWait ($oIE1) $tYTPageLoadEnd = _Date_Time_GetSystemTime() ; Timestamp for end for YouTube page load The problem is, while the page reports to load completely, the flash video is not yet ready. Is there a way to wait for an individual object to be ready? I'm currently waiting for 10 seconds before I try to use any of the buttons on the object. Here's an example: Sleep (10000) ; done like this until I figure out how to wait for the object to load ControlClick($iewindow1, "", "[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]", "left", 2, 15, 375) ; toggles Play/Pause to Pause Is there a way to use the class information in an object context, and a way I can specify to wait for said object to load? Gratefully yours, - Scorputer Link to comment Share on other sites More sharing options...
BillLuvsU Posted October 28, 2008 Share Posted October 28, 2008 Well I know for youtube, you could at least check the color of the progress bar, to see if it loadied anything. But if you want it more robust (I assume you do) I would do some research into where the data goes on your hardrive and then check for that instead. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
aNewLyfe Posted October 28, 2008 Share Posted October 28, 2008 Well I know for youtube, you could at least check the color of the progress bar, to see if it loadied anything. But if you want it more robust (I assume you do) I would do some research into where the data goes on your hardrive and then check for that instead.yeah u can check for video filesize with inetgetsize, then wait until temp file matches it . or something like that ~ Every Living Thing is a Code Snippet of World Application ~ Link to comment Share on other sites More sharing options...
DaleHohm Posted October 28, 2008 Share Posted October 28, 2008 You'll find Flash in a webpage embedded in <OBJECT> or <EMBED>. Java applets use <APPLET>. All 3 of these tags simply provide a container to encapsulate an embedded object. Other than height and width there is little that the object is required to supply to the browser. You can find some information here: http://kb.adobe.com/selfservice/viewConten...rnalId=tn_12701That said, the object MAY provide information by way of attributes on the container tag and MAY honor changes in attributes you make to those attributes (like PARAM, VALUE pairs). It is entirely up to the object however because it is not required by the browser.Therefore, standard DOM methods like readyState (used by _IELoadWait) to no tapply to these objects. You'll need to study the specific object and find any documentation of its behaviour that may assist you.Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Bert Posted October 28, 2008 Share Posted October 28, 2008 Go here:http://www.martijndevisser.com/blog/flv-player/It works well, and you don't need to code anything. It will run from a flash drive, so you can take your movies with you anywhere.. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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