Jump to content

URGENT! How to measure time period between mouse click and executing of task


Recommended Posts

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

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

Yes, 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

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

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

Look 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

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

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 by mightyduck
Link to comment
Share on other sites

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 by Inverted
Link to comment
Share on other sites

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

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 by Stilgar
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...