Solved

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

Posted on 2008-10-23
5
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

751 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