Saturday, 11 January 2014

Automatically Refresh/Reload a Web Page at fixed Interval of Time (Using VB Script)

Copy the code below to notepad and save it as refresh.vbs
Double click on the file to run the script.

On Error Resume Next

Set objExplorer = CreateObject("InternetExplorer.Application")

objExplorer.Navigate "http://www.youtube.com/watch?v=81MV1agQMG4"
objExplorer.Visible = 1

Wscript.Sleep 5000

Set objDoc = objExplorer.Document

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

TEXT TO SPEECH (Using VB Script)

Copy the code below to notepad and save it as filename.vbs
Double click on the file to run the script.

dim m, s
   m=inputbox("Enter text","Text2Speech")
   set s=createobject("sapi.spvoice")
   s.Speak m