1.

Solve : Open then close new sites with time intervals??

Answer»

I want to have a CODE where it Opens a message box you SELECT yes or no then after selecting yes
It opens a new webpage, waits 10 seconds, closes it,
repeat
then at end have a message box saying finished?

I kinda got started but can someone help me




x=msgbox ("BLAH CLICK YES", 4,"blah")
if x=6 then
msgbox "d", 0,"Ve"
Const newTab = &H800
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate "http://www.google.com/1"
objIE.Visible = True
WScript.Sleep 6
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate "http://www.newopen.com"
objIE.Visible = True
WScript.Sleep 6
objIE.Navigate2 "http://www.miniclip.com/games/kung-fu-statesmen/en/", newTab
objIE.Visible = False
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate "http://www.endpage.com"
objIE.Visible = True
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("C:\test.bat"), 0, True
elseif x=7 then
msgbox "Exit ?", 0,"Are you sure?"
end ifHaven't found a way to MAKE a pop-up prompt other than 'start akfh.bat' which you can do, but things get messy quickly. I'll post both methods.

Code: [Select]@echo off
start
cls
echo THIS IS WHERE YOU DISPLAY YOUR QUESTION
choice
if %errorlevel% EQU 1 goto open
if %errorlevel% EQU 2 goto wait

:open
start www.YOURWEBSITE.com
timeout /t 10 /nobreak >nul
REM if you do not have windows 7 you will have to replace the above line with
REM "ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127"
taskkill YOURDEFAULTINTERNETBROWSER.exe
goto end

:wait
timeout /t 10 /nobreak >nul
REM if you do not have windows 7 you will have to replace the above line with
REM "ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127 & ping 1.0.0.127"

:end
echo Finished?
choice
if %errorlevel% EQU 1 goto start
exit


Try this out. If you want a prompt that will pop-up try making a seperate file for :open and have a 'start YOURFILE.bat'


What you started looks to me like java, but I could be wrong.[/code]HEY thanks alot man i really appreciate it



Discussion

No Comment Found