<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBScript: объект Internet Explorer, работа с фреймом]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5642</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5642&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBScript: объект Internet Explorer, работа с фреймом».]]></description>
		<lastBuildDate>Thu, 24 Mar 2011 21:00:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBScript: объект Internet Explorer, работа с фреймом]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46800#p46800</link>
			<description><![CDATA[<p>OFF: Не трещит, а щёлкает ! ) Это новая фича (feature) ослика. Таким образом майкрософт создаёт эффект сложности механизмов работающих внутри IE. (Работает как часы).</p>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Thu, 24 Mar 2011 21:00:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46800#p46800</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: объект Internet Explorer, работа с фреймом]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46796#p46796</link>
			<description><![CDATA[<p>Спасибо! допер! Я вопрос немножко неправильно поставил. И еще вопросик: че он как трактор трещит?<br /></p><div class="codebox"><pre><code>Set IE = WScript.CreateObject(&quot;InternetExplorer.Application&quot;, &quot;IE_&quot;)
IE.Navigate &quot;http://mickey666x.narod.ru/other/frame.html&quot;
IE.Visible = True

Do
    WScript.Sleep 200
Loop Until IE.ReadyState = 4

While 0=0
    WScript.Sleep 1000
Wend

Sub IE_BeforeNavigate2(ByVal pDisp, ByRef url, ByRef Flags, ByRef TargetFrameName, ByRef PostData, ByRef Headers, ByRef Cancel)
    
    If InStr(URL, &quot;mickey666x&quot;) &gt; 0 Then
        Exit Sub
    Else
        pDisp.Navigate &quot;about:blank&quot;
        Cancel = True
    End If
End Sub

Sub IE_OnQuit()
    MsgBox &quot;Вы закрыли Internet Explorer&quot;,vbInformation,&quot;Internet Explorer&quot;
    WScript.Quit
End Sub</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Mickey666x)]]></author>
			<pubDate>Thu, 24 Mar 2011 20:39:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46796#p46796</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: объект Internet Explorer, работа с фреймом]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46791#p46791</link>
			<description><![CDATA[<div class="codebox"><pre><code>Dim InternetExplorer, ExitDo
Set InternetExplorer = WScript.CreateObject(&quot;InternetExplorer.Application&quot;,&quot;InternetExplorer_&quot;)
InternetExplorer.Visible = True

InternetExplorer.Navigate &quot;http://www.ya.ru/&quot;

WScript.Sleep 5000

InternetExplorer.Navigate &quot;http://www.demogorgon.ru/&quot;

Sub InternetExplorer_OnQuit()
    ExitDo = True
End Sub

Sub InternetExplorer_BeforeNavigate2(ByVal pDisp, URL, Flags, TargetFrameName, PostData, Headers, Cancel)
    if InStr(1,URL,&quot;demogorgon&quot;,1) &gt; 0 then 
        InternetExplorer.Navigate &quot;about:blank&quot;
    End if    
End Sub

Do
    WScript.Sleep 100
Loop Until ExitDo

MsgBox &quot;Internet Explorer closed&quot;, vbInformation</code></pre></div><p>либо для фреймов</p><div class="codebox"><pre><code>InternetExplorer.Navigate &quot;about:blank&quot;</code></pre></div><p>заменить на<br /></p><div class="codebox"><pre><code>pDisp.Navigate &quot;about:blank&quot;</code></pre></div><p>P.S Вообще по идее нужно присваивать <strong>Cancel = True</strong>. Но что то не хочет он работать. И метод <strong>Stop</strong> тоже не спасает</p>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Thu, 24 Mar 2011 18:38:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46791#p46791</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: объект Internet Explorer, работа с фреймом]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46788#p46788</link>
			<description><![CDATA[<p>Я знаю что секрет кроется в событии BeforeNavigate2. Только как остановить загрузку фрейма вообще.<br /></p><div class="codebox"><pre><code>Sub IE_BeforeNavigate2(ByVal pDisp, ByRef url, ByRef Flags, ByRef TargetFrameName, ByRef PostData, ByRef Headers, ByRef Cancel)
    If InStr(URL, &quot;demogorgon&quot;) &gt; 0 Then
        Exit Sub
    Else
        pDisp.Stop
    End If
End Sub</code></pre></div><p>Вот что то вроде того, но навигация продолжается.</p>]]></description>
			<author><![CDATA[null@example.com (Mickey666x)]]></author>
			<pubDate>Thu, 24 Mar 2011 17:47:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46788#p46788</guid>
		</item>
		<item>
			<title><![CDATA[VBScript: объект Internet Explorer, работа с фреймом]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46787#p46787</link>
			<description><![CDATA[<p>Дан фрейм. В него загружается страница. Потом страница покидает фрейм. Я знаю что есть защита от помещения страницы в фрейм. Можно с этим бороться? Или как вообще отменить навигацию, когда он попытается покинуть фрейм.<br />Как есть:<br /></p><div class="codebox"><pre><code>Set IE=CreateObject(&quot;InternetExplorer.Application&quot;)
IE.Visible=True
IE.Navigate &quot;http://www.demogorgon.ru/&quot;
WScript.Sleep 10000
IE.Navigate &quot;http://www.sumaclicks.com&quot;, Null, &quot;mainFrame&quot;</code></pre></div><p>А вот пример как надо:<br /></p><div class="codebox"><pre><code>Set IE=CreateObject(&quot;InternetExplorer.Application&quot;)
IE.Visible=True
IE.Navigate &quot;http://www.demogorgon.ru/&quot;
WScript.Sleep 10000
IE.Navigate &quot;ya.ru&quot;, Null, &quot;mainFrame&quot;</code></pre></div><p>Спасибо!</p>]]></description>
			<author><![CDATA[null@example.com (Mickey666x)]]></author>
			<pubDate>Thu, 24 Mar 2011 17:29:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46787#p46787</guid>
		</item>
	</channel>
</rss>
