Sign in to follow this  
Followers 0
mightyduck

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

12 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Look at _IELoadWait() in the help file.

:)

It seems this doesnt work with Firefox :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by mightyduck

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by Inverted

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 by Stilgar

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0