Page 1 of 1

WebBrowser auto refresh

Posted: Sat Nov 16, 2013 2:33 pm
by nkwai
Hi, I'm trying to the WebBrowser to automatic refresh, but whit no luck. I made a function with the TObjFunction, if I use it with a button it works nice if I call it inside another function it does not refresh. Can someone explain me why?
Thank You

Re: WebBrowser auto refresh

Posted: Tue Nov 19, 2013 11:42 am
by admin
Dear Sir,
the tObject functions must be called from functions launched in the template. For example onClick function on button or openFunction of template.

Best Regards

Re: WebBrowser auto refresh

Posted: Tue Nov 19, 2013 12:58 pm
by nkwai
Hi,
I tryed to run the function from the template openFunction. The first time it refreshes but then it won't anymore.
The function is:

function void onOpen()
while(WindowIsOpen())
TObjFunction(1,1);
Sleep(300000);
end
end

Re: WebBrowser auto refresh

Posted: Tue Nov 19, 2013 2:28 pm
by admin
Dear Sir,
I tried your code. It work properly, the refresh is done every 5 minutes (Sleep(300000);)
I don't think that the error is in your code.

You can post a test application?

Regards

Re: WebBrowser auto refresh

Posted: Tue Nov 19, 2013 9:57 pm
by nkwai
Here is the application.

Best Regards

Re: WebBrowser auto refresh

Posted: Wed Nov 20, 2013 8:32 am
by admin
Dear Sir,
your application works correctly. Every 5 minutes is done the refresch of web page.
To be sure that the function is properly be call I inserted a "MessageBox" that appears on the screen each time you run the refresch (only for test).

Best Regards

Re: WebBrowser auto refresh

Posted: Wed Nov 20, 2013 12:30 pm
by nkwai
Hi,

yes the function works, the message box pops up, the problem is that the image is not updated. The image on the adress updates automaticaly every 10 minutes.
If I open the app now the iamge will be with the hour 13:00, even if I let the app open for 2 hours the image will still be from 13:00 instead of being updated.

Re: WebBrowser auto refresh

Posted: Wed Nov 20, 2013 3:00 pm
by admin
Dear Sir,
I did a test with sleep at 10 seconds and refresch is done properly.

Best Regards

Re: WebBrowser auto refresh

Posted: Mon Nov 25, 2013 5:11 am
by nkwai
Hi,

finally resolved the problem.
The problem was not in the code or anywhere in WinLog, but in the Internet Explorer settings.
For thous having the same problem, you have to set Internet Explorer Temporary Internet Files Settings to check everytime you visit the page.

Re: WebBrowser auto refresh

Posted: Mon Nov 25, 2013 8:08 am
by admin
Ok, I understand. I could not find the problem because I already have Internet Explorer set up this way.

Thanks and best regards.