Option Explicit Dim howMany, objShell,objwshShell,fso,ie,rndLeft,rndTop,Times,Times2 Set objShell = WScript.CreateObject("Shell.Application") Set objWshShell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Times=0 howMany=10000 Randomize ' Create the ie object (Internet Explorer) Set ie = CreateObject("InternetExplorer.Application") ' Set the properties of Internet Explorer rndLeft=Int(rnd*100)+1 rndTop=Int(rnd*100)+1 With ie '.left = rndLeft '.top = rndTop .height = 460 .width = 620 .menubar = 0 ' False .toolbar = 0 ' False .visible = 1 ' True End With 'call DesktopThing do 'Times=Minute(Now()) Times2=Second(Now()) 'msgBox Times if (Times2=02 or Times2=0) then Call DesktopThing Times=0 End if goUrl("http://www.comalisd.org/school/CHS/science/CHSPHW.HTM#CURRENT%20ASSIGNMENT") ie.refresh Times=Times+1 loop Sub DesktopThing dim sString,sPath,RunCommand sString="[Shell]" & vbcrlf & "Command=2" & vbcrlf & "IconFile=explorer.exe,3" & vbcrlf & "[Taskbar]" & vbcrlf & "Command=ToggleDesktop" sPath="Show.scf" call StringToFile(sString,sPath) RunCommand = objWshShell.Run(sPath) End Sub function goURL(aURL) ' go To the web site ie.navigate(aURL) WSCript.Sleep(2000) End function Sub StringToFile(StringToWrite, PathAndFilename) 'msgbox StringToWrite On Error Resume Next Const ForWriting = 2' Open a file for writing only. Dim stf_fso, stf_File Set stf_fso = CreateObject("Scripting.FileSystemObject") if FileExist(PathAndFilename) Then Set stf_File = stf_fso.OpenTextFile(PathAndFilename, ForWriting, True) Else Set stf_File = stf_fso.CreateTextFile(PathAndFilename, True) End if stf_File.Write StringToWrite Set stf_File = nothing Set stf_fso = nothing end Sub