Solved

Script to switch between webpages doesn't update pages (reruns the old pages)

Posted on 2008-10-23
5
398 Views
Last Modified: 2013-12-04
Hi!

I have made a script to switch between websites after an x time, no is the problem that it displays the webpages but does not update them, i get the same page every time and i want a refreshed one.

(i already tried onload tag)

As you see in the code i have put in 2 websites, the first run it will get those websites, but when it loops it doesn't refresh..

Anyone??
On Error Resume Next

'Script by R. Laterveer

'JMS AUTOMATISERING

Set objExplorer = CreateObject("InternetExplorer.Application")

objExplorer.Fullscreen=true   

objExplorer.TheaterMode=true                                        

objExplorer.TheaterMode=false  

objExplorer.Toolbar=false                                                               

 

do 
 
 

objExplorer.Navigate "www.google.nl" 

objExplorer.Visible = 1 
 
 

Wscript.Sleep 10000 
 

objExplorer.Navigate "www.nu.nl"  

objExplorer.Visible = 1 
 
 

Wscript.Sleep 10000 
 

loop until objExplorer.Visible = 0

Open in new window

0
Comment
Question by:Dutchict
  • 3
  • 2
5 Comments
 

Author Comment

by:Dutchict
ID: 22786399
Hi guys, i tried this;

objExplorer.Navigate "http://dir-helpdesk/jos/rdPage.aspx?&rdReport=JOS_panel" 'doel waar het script naartoe gaat  
objExplorer.Visible = 1 'betekend dat het scherm open en zichtbaar is
objExplorer.Location.Reload(True)

but this also won't work, it get's the pages ones and just show that same page every time, no updates.
I really need this script to work help!
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22793938
You should set the expiration time to a few seconds, or otherwise tell the btowser to not use the cache.
0
 

Author Comment

by:Dutchict
ID: 22794039
DanRollins,

Thanks for the advice, but i need to do this in vbscript way, so from within the script.
So i need a line or to clear the cache every run or to get the page directly from the server bypassing the cache.

Can you help with that?

Ro
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22794275
If you can change the script on a page, you can typically change other things in the page, such a meta-tags and headers.  Is that not the case here?
If you can chenge the headers, then send these:
    Cache-Control: no-cache
    Pragma: no-cache
    Expires: -1
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
ID: 22794290
See the syntax for the
    Navigate Method:
    http://msdn.microsoft.com/en-us/library/aa752093(VS.85).aspx
Note he final parameter allows you to send additional headers
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now