none
Script to refresh IE to homepage not current page RRS feed

  • Question

  • Hi All,

    Firstly thanks for any help on this! I'm very new to scripting, so sorry for any errors.

    I need to create a local script to make IE refresh to the homepage, rather than the current page.

    The script I use was actually from this forum, could this be altered so it reloads to the page "objExplorer.Navigate" webpage

    Thank you

    M

    -------------------------------------------------------------

    On Error Resume Next

    Set objExplorer = CreateObject("InternetExplorer.Application")

    objExplorer.Navigate "website"   
    objExplorer.Visible = 1

    Wscript.Sleep 5000

    Set objDoc = objExplorer.Document

    Do While True
        Wscript.Sleep 30000    
        objDoc.Location.Reload(True)
        If Err <> 0 Then
            Wscript.Quit
        End If
    Loop



    • Edited by jam789 Wednesday, August 13, 2014 11:32 AM
    Wednesday, August 13, 2014 11:32 AM

Answers

  • No Worries, I've found out how to do it, using the existing script, just needed to play with it.

    On Error Resume Next

    Set objExplorer = CreateObject("InternetExplorer.Application")

    objExplorer.Navigate "website"   
    objExplorer.Visible = 1

    Wscript.Sleep 5000

    Set objDoc = objExplorer.Document

    Do While True
        Wscript.Sleep 130000    
        objDoc.Location.Reload(True)
        objExplorer.Navigate "website"   
        objExplorer.Visible = 1
        If Err <> 0 Then
            Wscript.Quit
        End If
    Loop

    Thanks for your help



    • Edited by jam789 Wednesday, August 13, 2014 1:05 PM
    • Marked as answer by jam789 Wednesday, August 13, 2014 2:52 PM
    Wednesday, August 13, 2014 1:05 PM

All replies

  • Why?  Just start a new copy and it will be opened at the default home page.


    ¯\_(ツ)_/¯

    Wednesday, August 13, 2014 11:35 AM
  • Hi,

    Thanks for your reply, when you say a new copy, do you mean a new instance of IE? would this also needed to be scripted? Please note, this PC will be used as a kiosk so will be very locked down.




    • Edited by jam789 Wednesday, August 13, 2014 11:43 AM
    Wednesday, August 13, 2014 11:43 AM
  • Set ie = CreateObject("InternetExplorer.Application")
    With ie
        .Visible= True
        .Navigate "http://www.google.com"
        While ie.Busy
            WScript.Sleep 200
        Wend
        ie.GoHome
    End With


    ¯\_(ツ)_/¯

    Wednesday, August 13, 2014 11:46 AM
  • Hi,

    Thanks for this, this works really well, much simpler, however it does not refresh back to the home page when other tabs are selected. This is because users will tend to select other tabs, it should go back to the homepage so we don't have to manually do it. 

    Thanks

    M



    • Edited by jam789 Wednesday, August 13, 2014 11:57 AM
    Wednesday, August 13, 2014 11:57 AM
  • I think you want to purchase a Kiosk toolbox that has all of the bits you need.

    A KIOSK normally does not use tabbed browsing.

    Normally the web site does the browser management in a Kiosk.  This allows a simple setup and allows the site/application to run on thin clients.


    ¯\_(ツ)_/¯

    Wednesday, August 13, 2014 12:10 PM
  • No Worries, I've found out how to do it, using the existing script, just needed to play with it.

    On Error Resume Next

    Set objExplorer = CreateObject("InternetExplorer.Application")

    objExplorer.Navigate "website"   
    objExplorer.Visible = 1

    Wscript.Sleep 5000

    Set objDoc = objExplorer.Document

    Do While True
        Wscript.Sleep 130000    
        objDoc.Location.Reload(True)
        objExplorer.Navigate "website"   
        objExplorer.Visible = 1
        If Err <> 0 Then
            Wscript.Quit
        End If
    Loop

    Thanks for your help



    • Edited by jam789 Wednesday, August 13, 2014 1:05 PM
    • Marked as answer by jam789 Wednesday, August 13, 2014 2:52 PM
    Wednesday, August 13, 2014 1:05 PM
  • That is not what you asked for.


    ¯\_(ツ)_/¯

    Wednesday, August 13, 2014 1:12 PM
  • Sorry if I worded incorrectly :(

    On the bright side, it's sorted!


    • Edited by jam789 Wednesday, August 13, 2014 1:23 PM
    Wednesday, August 13, 2014 1:23 PM