mightyduck Posted July 6, 2009 Share Posted July 6, 2009 Hello, I need to find out how to measure time period from the moment I clicked on some icon(e.g zoom on the google map) till the moment that data is completely loaded in browser. Can here help functions TimerInit() or TimerDiff()? Thanks in advance Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2009 Share Posted July 6, 2009 Hello,I need to find out how to measure time period from the moment I clicked on some icon(e.g zoom on the google map) till the moment that data is completely loaded in browser. Can here help functions TimerInit() or TimerDiff()?Thanks in advanceYes, those are the right functions to use. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
mightyduck Posted July 6, 2009 Author Share Posted July 6, 2009 Yes, those are the right functions to use. thanks for your answer,And how to know when data are loaded on page...I assume that I can use WinWaitActive() function, but what will be parameters?For example, during instalation of winzip its posible to distinguish windows bye the contents and words shown on window....but here only thing is changed is a data in the map!!!regards Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2009 Share Posted July 6, 2009 thanks for your answer,And how to know when data are loaded on page...I assume that I can use WinWaitActive() function, but what will be parameters?For example, during instalation of winzip its posible to distinguish windows bye the contents and words shown on window....but here only thing is changed is a data in the map!!!regardsLook at _IELoadWait() in the help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
mightyduck Posted July 6, 2009 Author Share Posted July 6, 2009 Look at _IELoadWait() in the help file. It seems this doesnt work with Firefox Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2009 Share Posted July 6, 2009 It seems this doesnt work with Firefox That's true, it is intended only for IE.You could try _FFLoadWait() from the FF.au3 UDF. But that requires installing an add-on to FF (MozRepl). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
trancexx Posted July 6, 2009 Share Posted July 6, 2009 (edited) It would be cool if someone would say "Then use FF.au3" (or whatever) and you say: "But it doesn't work for Mac". edit: hey Psalty dammit! I'm slow like... Edited July 6, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
mightyduck Posted July 6, 2009 Author Share Posted July 6, 2009 (edited) That's true, it is intended only for IE.You could try _FFLoadWait() from the FF.au3 UDF. But that requires installing an add-on to FF (MozRepl). Hi, I tried with this part of code, which basicly start FF and load some url. I wanted to measure time from the moment of importing URL into browser till the moment that all page is loaded, but thid msgBox appear imediately after url is typed.#Include <FF.au3>_FFStart();Run ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe" );WinWaitActive ( "Mozilla Firefox" );WinSetState ( "Mozilla Firefox", "", @SW_MAXIMIZE )Send ( "{F6}" )$attempt = Send( "http://www.firefox.net {ENTER}")$begin = TimerInit()$try = _FFLoadWait($attempt);If _FFIsConnected() Then If $try Then $dif = TimerDiff($begin)MsgBox(0,"Time Difference",$dif)its same if i dont use this variable $attempt. I dont know what Im doing wrong :|thx Edited July 6, 2009 by mightyduck Link to comment Share on other sites More sharing options...
Inverted Posted July 6, 2009 Share Posted July 6, 2009 (edited) Lol ! Don't use Send to send keystrokes to FF, ise the FF functions to open the page !!! Check the documentation, (Ive never used it myself) Use _FFStart or _FFOpenURL("http://www.google.com) Edited July 6, 2009 by Inverted Link to comment Share on other sites More sharing options...
mightyduck Posted July 6, 2009 Author Share Posted July 6, 2009 Lol ! Don't use Send to send keystrokes to FF, ise the FF functions to open the page !!!Check the documentation, (Ive never used it myself)Use _FFStart or _FFOpenURL("http://www.google.com)I started doing like you said, but problem is that it works perfectly fine with outer domain, but when I need to load page from localhost those functions doesnt open it(it said wrong url?!).Because of that I was using Send... Link to comment Share on other sites More sharing options...
Stilgar Posted July 7, 2009 Share Posted July 7, 2009 (edited) I started doing like you said, but problem is that it works perfectly fine with outer domain, but when I need to load page from localhost those functions doesnt open it(it said wrong url?!).Because of that I was using Send...Localhost and IPs are currently not supported, but you can open it with:_FFCmd(".location.href='YourLocalHostAdress'")If you use _FFLoadWait after this, the @EXTENDED macro holds the loading time in ms. Edited July 7, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 7, 2009 Share Posted July 7, 2009 What's up with this? $attempt = Send( "http://www.firefox.net {ENTER}") Send() doesn't return anything (that you can count on), so that sets the variable $attempt to an unknown value. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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