PsycoWiLL Posted May 16, 2005 Share Posted May 16, 2005 hi, i self solved my other problem, but i came to a dead end:how can i make it so my script waits till a page is loaded? i dont wanna do a simple Sleep() call and guess a timethx in advance Link to comment Share on other sites More sharing options...
buzz44 Posted May 17, 2005 Share Posted May 17, 2005 This was mention in another topic very recently... You have to options I know of. You can use PixelGetColor() to get the color of a pixel of the website. That way you can see if its loaded or not. Disadvantages is each computer its run on may have a different browser/browser resolution/screen resolution etc. As you can see its only good for personal use. The seconds option is to use StatusBarGetText(), look it up in the helpfile. It has an example with IE but it can also be used for other browsers . qq Link to comment Share on other sites More sharing options...
DaleHohm Posted May 17, 2005 Share Posted May 17, 2005 And there is a third option with COM (with 3.1.1++). For IE: Const $URL = "http://your-location" $ObjIE=ObjCreate("InternetExplorer.Application") With $ObjIE .Visible = True .Navigate($URL) Do; Idle until page load is complete Sleep(50) Until .ReadyState = 4 EndWith ;your code here 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...
buzz44 Posted May 17, 2005 Share Posted May 17, 2005 But you can't do that with FireFox right? qq Link to comment Share on other sites More sharing options...
DaleHohm Posted May 18, 2005 Share Posted May 18, 2005 But you can't do that with FireFox right?<{POST_SNAPBACK}>Correct. No COM interface for FireFox. There should be ways to do this by tapping into the DOM object model, but I have not attempted it.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...
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