Jump to content

simple timer as a label


SHAHRAM
 Share

Recommended Posts

Hello,

I am calling certain functions that might take a little time before they are finished eg (IECreate())

I wanted to see if it is possible while waiting for the the function to finish (_IELoadWait()), I could update a label with some timer showing the seconds of waiting....

Link to comment
Share on other sites

I would use the functions TimerInit with TimerDiff, and update the label every 1000 miliseconds with GUICtrlSetData . You should read about these functions in the help file.

yes I know, but during the time that those functions that I am waiting for to finish (eg IECreate()) havent finished or timed out, the whole script is on pause, so I cant call another function, or if I initiate the timer function first, I cant move on to the original function.

specially in this case the IECreate() for a specific page takes around 25-30 sec to finish and I should wait for it to be able to get its content.

Link to comment
Share on other sites

How are you testing that the page has loaded? Are you using _IELoadWait? (Oops, you said that already DOH) Perhaps you could use AdlibRegister to update the label. Or if that doesn't work then maybe you can test if the page has loaded using a different method, as suggested in the help file remarks under _IELoadWait.

Edited by czardas
Link to comment
Share on other sites

How are you testing that the page has loaded? Are you using _IELoadWait? (Oops, you said that already DOH) Perhaps you could use AdlibRegister to update the label. Or if that doesn't work then maybe you can test if the page has loaded using a different method, as suggested in the help file remarks under _IELoadWait.

thank you!

I dont test if the page is loaded, with the wait option it just waits for the function to finish before continuing

I simply use _IELoadWait() to set custom timeouts, however it should work the same if I used the _IECreate()'s wait option instead.

and I am not sure if I skipped this waiting how I can check page load status before I call _IEBodyReadHTML(),

However, AdlibRegister was the way to go, it worked :)

thanks

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...