Javascript-форум (https://javascript.ru/forum/)
-   Internet Explorer (https://javascript.ru/forum/css-html-internet-explorer/)
-   -   Internet Explorer refresh (https://javascript.ru/forum/css-html-internet-explorer/8534-internet-explorer-refresh.html)

ushlepok 31.03.2010 16:17

Internet Explorer refresh
 
HI

есть такой скрипт:

'IErefresh.vbs

option explicit
dim ie, url, refreshSeconds, i

url = InputBox("Enter web site URL (http:// optional)")
if url = "" then WScript.Quit
refreshSeconds = InputBox("Enter refresh interval in seconds",,60)
if IsEmpty(refreshSeconds) then WScript.Quit
set ie = WScript.CreateObject("InternetExplorer.Application", "ie_")
ie.Navigate url
ie.Visible = true
do until ie.ReadyState = 4 : WScript.Sleep 100 : loop 
while true
	i = 0
	while i < CInt(refreshSeconds)
		WScript.Sleep 1000
		i = i + 1
	wend	
	ie.refresh2 3	'3=REFRESH_COMPLETELY
wend

sub ie_onQuit
	WScript.Quit
end sub


может ли ктонибудь посоветовать как его отредактировать чтобы не нужно было вводить адрес сайта и секунды вручную при запуске, а чтобы я один раз при редактировании ввёл адресс и время и во время запустка он мне сразу открывал заданую страницу и обновлял каждые ** секунд.

заранее лбагодарен!

subzey 31.03.2010 17:30

url = InputBox("Enter web site URL (http:// optional)")
заменяем на
url = "http://google.ru/";

refreshSeconds = InputBox("Enter refresh interval in seconds",,60)
заменяем на
refreshSeconds = 60

И завязывайте с этим VBscript, WSH прекрасно доступен и из js.

ushlepok 31.03.2010 17:38

subzey,
Огромное спасибо!

Помогло


Часовой пояс GMT +3, время: 08:50.