WebBrowser auto refresh

Discussion about Code Builder Builder and Winlog language support.
nkwai
Posts: 5
Joined: Sat Nov 16, 2013 2:29 pm

WebBrowser auto refresh

Postby nkwai » Sat Nov 16, 2013 2:33 pm

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

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: WebBrowser auto refresh

Postby admin » Tue Nov 19, 2013 11:42 am

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

nkwai
Posts: 5
Joined: Sat Nov 16, 2013 2:29 pm

Re: WebBrowser auto refresh

Postby nkwai » Tue Nov 19, 2013 12:58 pm

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

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: WebBrowser auto refresh

Postby admin » Tue Nov 19, 2013 2:28 pm

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

nkwai
Posts: 5
Joined: Sat Nov 16, 2013 2:29 pm

Re: WebBrowser auto refresh

Postby nkwai » Tue Nov 19, 2013 9:57 pm

Here is the application.

Best Regards
Attachments
test.zip
(7.53 KiB) Downloaded 245 times

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: WebBrowser auto refresh

Postby admin » Wed Nov 20, 2013 8:32 am

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
Attachments
test.zip
(9.72 KiB) Downloaded 255 times

nkwai
Posts: 5
Joined: Sat Nov 16, 2013 2:29 pm

Re: WebBrowser auto refresh

Postby nkwai » Wed Nov 20, 2013 12:30 pm

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.

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: WebBrowser auto refresh

Postby admin » Wed Nov 20, 2013 3:00 pm

Dear Sir,
I did a test with sleep at 10 seconds and refresch is done properly.

Best Regards

nkwai
Posts: 5
Joined: Sat Nov 16, 2013 2:29 pm

Re: WebBrowser auto refresh

Postby nkwai » Mon Nov 25, 2013 5:11 am

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.

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: WebBrowser auto refresh

Postby admin » Mon Nov 25, 2013 8:08 am

Ok, I understand. I could not find the problem because I already have Internet Explorer set up this way.

Thanks and best regards.


Return to “Code - Code Builder”

Who is online

Users browsing this forum: No registered users and 1 guest