<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Вытащить данные из динамичной таблицы]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10291&amp;type=atom" />
	<updated>2015-01-01T00:52:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10291</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89914#p89914" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>charony пишет:</cite><blockquote><p>да все прекрасно работает, остальное я запилю как мне нужно</p></blockquote></div><p>Ну, вот и славненько.</p><div class="quotebox"><cite>Flasher пишет:</cite><blockquote><p>Да. Quit - это не завершение программы, а закрытие объекта.</p></blockquote></div><p>Но вот у меня — завершает.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2015-01-01T00:52:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89914#p89914</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89913#p89913" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>Flasher, а нужен ли тогда «.Quit»?</p></blockquote></div><p>Да. Quit - это не завершение программы, а закрытие объекта.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2014-12-31T19:04:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89913#p89913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89912#p89912" />
			<content type="html"><![CDATA[<p>да все прекрасно работает, остальное я запилю как мне нужно<br />спасибо еще раз<br />буду рад поддержать через РР</p><br /><p>я еще спросить хотел<br />есть ли возможность получить тот же результат , через стандартные виндуфф dll?</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T18:54:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89912#p89912</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89911#p89911" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>charony пишет:</cite><blockquote><p>так?</p></blockquote></div><div class="quotebox"><cite>Flasher пишет:</cite><blockquote><p>Через :</p></blockquote></div><p>Или в две строки:</p><div class="codebox"><pre><code>    …
    SetLocale lngPrevLocale
    
    .ExecWB 45, 2
    .Quit
End With
…
</code></pre></div><p><strong>charony</strong>, так сработал «.ExecWB» или нет?</p><p><strong>Flasher</strong>, а нужен ли тогда «.Quit»?</p><div class="quotebox"><cite>charony пишет:</cite><blockquote><p>может у знакомых есть PayPal?</p></blockquote></div><p>У меня нет таких знакомых <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />. Я спрошу завтра у <strong>atomix</strong>&#039;а — может, у него есть.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-12-31T17:52:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89911#p89911</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89909#p89909" />
			<content type="html"><![CDATA[<p>много всем спасибо<br />и с наступающим</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T15:01:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89909#p89909</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89908#p89908" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>charony пишет:</cite><blockquote><p>так?</p></blockquote></div><p>Через :</p><div class="codebox"><pre><code>.ExecWB 45, 2 : .Quit</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2014-12-31T14:59:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89908#p89908</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89907#p89907" />
			<content type="html"><![CDATA[<p>@ alexii</p><p>может у знакомых есть PayPal?</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T14:49:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89907#p89907</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89906#p89906" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Flasher пишет:</cite><blockquote><div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>У меня на IE6 такого не наблюдается. Сожалею.</p></blockquote></div><p>А зачем сожалеть? Добавьте перед .Quit выход из программы <em>.ExecWB 45, 2</em> и всё.</p></blockquote></div><div class="codebox"><pre><code>
.ExecWB 45, 2 .Quit 
</code></pre></div><p>так?</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T14:39:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89906#p89906</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89905#p89905" />
			<content type="html"><![CDATA[<p>много спасибо , все работает как нужно</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T14:26:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89905#p89905</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89903#p89903" />
			<content type="html"><![CDATA[<p>Вообще-то с IE8 та же петрушка. А помочь можете указанной добавкой. <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2014-12-31T14:12:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89903#p89903</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89902#p89902" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, сожалею, потому как не могу в этом помочь. Я даже теоретически не могу проверить на IE11, поскольку не на что его ставить. Вот тут Вам и карты в руки <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-12-31T14:09:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89902#p89902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89901#p89901" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>У меня на IE6 такого не наблюдается. Сожалею.</p></blockquote></div><p>А зачем сожалеть? Добавьте перед .Quit выход из программы <em>.ExecWB 45, 2</em> и всё.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2014-12-31T13:48:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89901#p89901</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89900#p89900" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>IE не закрывается процесс после работы скрипта</p></blockquote></div><p>Как я понимаю, такое бывает. И не только при программном закрытии: <a href="http://answers.microsoft.com/en-us/ie/forum/ie9-windows_vista/after-closing-ie-windows-iexploreexe-processes-are/a3b1536d-1732-4f63-92d3-8fa927946d80">After closing IE windows iexplore.exe processes are still running - Microsoft Community</a>. У меня на IE6 такого не наблюдается. Сожалею.</p><div class="quotebox"><blockquote><p>первую строку , не нужно</p><p>первая строка должна начинаться с цифры</p><p>и если .12250В то 0.12250&nbsp; если .12030А то 0.123</p></blockquote></div><p>Пробуйте:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>Option Explicit

Const READYSTATE_COMPLETE = 4


Dim strUrl

Dim objHTMLTableRow
Dim objHTMLTableCell

Dim SomeValue
Dim strContent

Dim lngPrevLocale

Dim strPath


strUrl = &quot;http://www.cmegroup.com/trading/fx/g10/euro-fx_quotes_settlements_options.html&quot;

With WScript.CreateObject(&quot;InternetExplorer.Application&quot;)
    .Visible = True
    .Navigate strUrl
    
    Do
        WScript.Sleep 100
    Loop Until Not .Busy And .ReadyState = READYSTATE_COMPLETE
    
    strContent = &quot;&quot;
    
    lngPrevLocale = SetLocale(&quot;en-us&quot;)
    
    With .Document.GetElementByID(&quot;settlementsOptionsProductTable&quot;)
        .deleteTHead
        .deleteTFoot
        
        For Each objHTMLTableRow In .rows
            If objHTMLTableRow.rowIndex &gt; 0 And objHTMLTableRow.rowIndex &lt; .rows.length - 1 Then
                For Each objHTMLTableCell In objHTMLTableRow.cells
                    SomeValue = objHTMLTableCell.innerText
                    
                    Select Case objHTMLTableCell.cellIndex
                        Case 0
                            If IsNumeric(SomeValue) Then
                                SomeValue = CSng(SomeValue) / 1000
                            End If
                        Case 1
                            Select Case SomeValue
                                Case &quot;Call&quot;
                                    SomeValue = 0
                                Case &quot;Put&quot;
                                    SomeValue = 1
                            End Select
                        Case 2, 3, 4, 5
                            If SomeValue = &quot;-&quot; Then
                                SomeValue = 0
                            ElseIf Right(SomeValue, 1) = &quot;A&quot; Or Right(SomeValue, 1) = &quot;B&quot; Then
                                SomeValue = Left(SomeValue, Len(SomeValue) - 1)
                                
                                If IsNumeric(SomeValue) Then
                                    SomeValue = CSng(SomeValue)
                                End If
                            End If
                        Case 6, 7
                            If IsNumeric(SomeValue) Then
                                SomeValue = CSng(SomeValue)
                            ElseIf SomeValue = &quot;UNCH&quot; Or SomeValue = &quot;CAB&quot; Then
                                SomeValue = -1
                            End If
                        Case 8, 9
                            If IsNumeric(SomeValue) Then
                                SomeValue = CLng(SomeValue)
                            End If
                    End Select
                    
                    strContent = strContent &amp; SomeValue
                    
                    If objHTMLTableCell.cellIndex &lt; objHTMLTableRow.cells.length - 1 Then
                        strContent = strContent &amp; &quot;;&quot;
                    End If
                Next
                
                strContent = strContent &amp; vbCrLf
            End If
        Next
    End With
    
    SetLocale lngPrevLocale
    
    .Quit
End With

With WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;)
    strPath = .BuildPath(WScript.CreateObject(&quot;WScript.Shell&quot;).SpecialFolders(&quot;Desktop&quot;), &quot;data.txt&quot;)
    
    With .CreateTextFile(strPath, True, True)
        .Write strContent
        .Close
    End With
End With

WScript.CreateObject(&quot;WScript.Shell&quot;).Run &quot;&quot;&quot;&quot; &amp; strPath &amp; &quot;&quot;&quot;&quot;, 1, False

WScript.Quit 0
</code></pre></div></div></div><p>Если нормально — закомментируйте видимость окна IE:<br /></p><div class="codebox"><pre><code>.Visible = True</code></pre></div><p>и уберите открытие результирующего файла в связанном приложении:<br /></p><div class="codebox"><pre><code>WScript.CreateObject(&quot;WScript.Shell&quot;).Run &quot;&quot;&quot;&quot; &amp; strPath &amp; &quot;&quot;&quot;&quot;, 1, False</code></pre></div><p>Кстати, обратите внимание — в Вашем коде данные <em>дописывались</em> в текстовый файл, я же его переписываю заново целиком. Смените вобрат, если Вам надо иначе.</p><div class="quotebox"><blockquote><p>и киньте РР адрес</p></blockquote></div><p>Вот сюда: <a href="http://forum.script-coding.com/viewtopic.php?id=7796">Поддержка данного ресурса</a>, если есть желание, можете попробовать перечислить на поддержку ресурса.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-12-31T12:51:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89900#p89900</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89898#p89898" />
			<content type="html"><![CDATA[<p>первую строку не нужно , вот так должно быть как в файле</p><p>и если .12250В то 0.12250&nbsp; если .12030А то 0.1203 т.е без букв</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T12:17:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89898#p89898</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вытащить данные из динамичной таблицы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89897#p89897" />
			<content type="html"><![CDATA[<p>IE не закрывается процесс после работы скрипта</p>]]></content>
			<author>
				<name><![CDATA[charony]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32778</uri>
			</author>
			<updated>2014-12-31T12:11:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89897#p89897</id>
		</entry>
</feed>
