<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13974&amp;type=atom" />
	<updated>2018-07-26T15:10:53Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13974</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127421#p127421" />
			<content type="html"><![CDATA[<p>У нас есть несколько созданных тем по регулярным выражениям, можете выбрать любую, или создать свою. Чтобы вопрос был более понятен, нужно привести исходный текст (именно в виде текста, а не скриншотом), и что вы хотите извлечь.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-26T15:10:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127421#p127421</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127420#p127420" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br /><span class="postimg"><img src="http://sh.uploads.ru/t/2zcS3.png" alt="http://sh.uploads.ru/t/2zcS3.png" /></span><br /></p><div class="codebox"><pre><code>oWhr := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
oWhr.Open(&quot;GET&quot;, &quot;http://site/&quot;, false)
oWhr.Send()
html := oWhr.ResponseText
RegExMatch(html, &quot;U)id=&quot;&quot;list&quot;&quot;.*&lt;strong&gt;(.*)&lt;/strong&gt;&quot;, match)
RegExMatch(html, &quot;U)id=&quot;&quot;list&quot;&quot;.*&lt;i&gt;(.*)&lt;/i&gt;&quot;, matchs)
MsgBox, % match1
MsgBox, % matchs1</code></pre></div><p>Если у меня несколько &quot;list&quot;, можно ли их выбирать? Например со второго по счету &quot;list&quot; считать строку?</p>]]></content>
			<author>
				<name><![CDATA[kangar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39404</uri>
			</author>
			<updated>2018-07-26T14:57:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127420#p127420</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127418#p127418" />
			<content type="html"><![CDATA[<p>Надеюсь, это только для примера, но принцип, вижу, вы поняли. Если хотите получить количество тем в разделе AutoHotkey из коллекции, нужно в RegEx определить его более точно:</p><p><span class="postimg"><img src="https://i.imgur.com/GoJoCzD.png" alt="https://i.imgur.com/GoJoCzD.png" /></span></p><div class="codebox"><pre><code>oWhr := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
oWhr.Open(&quot;GET&quot;, &quot;http://forum.script-coding.com/index.php&quot;, false)
oWhr.Send()
html := oWhr.ResponseText
RegExMatch(html, &quot;U)id=&quot;&quot;category2&quot;&quot;.*&lt;span&gt;AutoHotkey&lt;/span&gt;.*&lt;strong&gt;(.*)&lt;/strong&gt;&quot;, match)
MsgBox, % match1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-26T14:22:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127418#p127418</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127416#p127416" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p><span class="postimg"><img src="http://s5.uploads.ru/t/X9JHM.png" alt="http://s5.uploads.ru/t/X9JHM.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[kangar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39404</uri>
			</author>
			<updated>2018-07-26T14:08:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127416#p127416</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127413#p127413" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>kangar пишет:</cite><blockquote><p>Ниже, мсгбокс выводит &quot;&lt;span&gt; Общение&quot;, хотя выбрал я &quot;&lt;span&gt;AutoHotKey&lt;/span&gt;&quot; (На скринах)</p></blockquote></div><p>Элементов с классом <em>hn</em> в коде страницы 17 штук. Вы указали первый встречающийся, а там текст именно тот, что вы получили. Подскажем, если догадаетесь, как правильно отобразить скриншот на странице, а пока видно только</p><p><span class="postimg"><img src="https://i.imgur.com/j2ViOT1.png" alt="https://i.imgur.com/j2ViOT1.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-26T13:48:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127413#p127413</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127410#p127410" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>WebRequest := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
WebRequest.Open(&quot;GET&quot;, &quot;http://forum.script-coding.com/index.php&quot;, false)
WebRequest.Send()
Body := WebRequest.ResponseText()
FoundPos := RegExMatch(Body, &quot;&lt;span&gt;AutoHotkey&lt;/span&gt;&quot;)
RegExMatch(Body, &quot;li class=&quot;&quot;info-topics&quot;&quot;&gt;&lt;strong&gt;(.*?)&lt;/strong&gt;&quot;, phone, FoundPos)
msgbox % phone1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2018-07-26T13:29:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127410#p127410</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127396#p127396" />
			<content type="html"><![CDATA[<p><strong>KusochekDobra</strong> Не откажете в паре вопросах?<br />Код ниже читает не кол-во тем, а текст &quot;темы&quot;.<br /></p><div class="codebox"><pre><code>WebRequest := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
WebRequest.Open(&quot;GET&quot;, &quot;http://forum.script-coding.com/index.php&quot;, false)
WebRequest.Send()
Body := WebRequest.ResponseBody
pArr := ComObjValue(Body)
cBytes := NumGet(pArr+0, A_PtrSize = 8? 24:16, &quot;uint&quot;)
pText := NumGet(pArr+0, A_PtrSize = 8? 16:12, &quot;ptr&quot;)
var := StrGet(pText, cBytes, &quot;utf-8&quot;)
RegExMatch(var, &quot;class=&quot;&quot;info-topics&quot;&quot;&gt;(.+?)&lt;/strong&gt;&quot;, phone)
msgbox % phone1</code></pre></div><p>Ниже, мсгбокс выводит &quot;&lt;span&gt; Общение&quot;, хотя выбрал я &quot;&lt;span&gt;AutoHotKey&lt;/span&gt;&quot; (На скринах)<br /></p><div class="codebox"><pre><code>WebRequest := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
WebRequest.Open(&quot;GET&quot;, &quot;http://forum.script-coding.com/index.php&quot;, false)
WebRequest.Send()
Body := WebRequest.ResponseBody
pArr := ComObjValue(Body)
cBytes := NumGet(pArr+0, A_PtrSize = 8? 24:16, &quot;uint&quot;)
pText := NumGet(pArr+0, A_PtrSize = 8? 16:12, &quot;ptr&quot;)
var := StrGet(pText, cBytes, &quot;utf-8&quot;)
RegExMatch(var, &quot;class=&quot;&quot;hn&quot;&quot;&gt;(.+?)&lt;/span&gt;&quot;, phone)
msgbox % phone1</code></pre></div><p><span class="postimg"><img src="https://imgur.com/a/TmSa60e" alt="https://imgur.com/a/TmSa60e" /></span><br /><span class="postimg"><img src="https://imgur.com/a/ZxsEhxo" alt="https://imgur.com/a/ZxsEhxo" /></span></p>]]></content>
			<author>
				<name><![CDATA[kangar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39404</uri>
			</author>
			<updated>2018-07-26T09:44:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127396#p127396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127394#p127394" />
			<content type="html"><![CDATA[<p>Ну так воспользуйтесь поиском, <strong>kangar</strong>. Как было ранее упомянуто, на страницах этого форума довольно много примеров с <em>WinHttpRequest</em> и некоторые даже с примерами парсинга, как с использованием HTMLfile, так и при помощи регулярных выражений.</p><p>Освойте вначале одно, затем, следующее и по пути, если будут возникать вопросы - не стесняйтесь задавать. Ваша задача - тривиальна, но лучший для Вас способ разобраться с ней, это не получить готовое решение, а пройти этот короткий путь самостоятельно. Более тем, что для этого всё уже приготовлено.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-07-26T09:09:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127394#p127394</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127390#p127390" />
			<content type="html"><![CDATA[<p><strong>alexii</strong> Представляю как сделать это на IE, вот только ослик такое себе решение.. <br />На WinHttpRequest я вообще не могу представить как это реализовать. <strong>:</strong><em>/</em></p>]]></content>
			<author>
				<name><![CDATA[kangar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39404</uri>
			</author>
			<updated>2018-07-26T08:54:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127390#p127390</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127386#p127386" />
			<content type="html"><![CDATA[<p><strong>kangar</strong>, нет и не может быть никаких:<br /></p><div class="quotebox"><cite>kangar пишет:</cite><blockquote><p> читалась конкретная строка сайта</p></blockquote></div><p>Делается запрос к серверу по указанному Url, в ответ получается ответ из текстового содержимого, который анализируется, и полученное содержимое разбирается по определённым правилам.</p><div class="quotebox"><cite>kangar пишет:</cite><blockquote><p>и как отобрать среди нескольких классов с одним названием нужный по номеру убывания. Т.е всего 7 например, а нужный 5-й. Как выбрать именно его? </p><p><span class="postimg"><img src="https://i.imgur.com/9Ola74V.png" alt="https://i.imgur.com/9Ola74V.png" /></span></p></blockquote></div><p>Самое надёжное — добраться по иерархии от самого верха. Либо отобрать в коллекцию все div&#039;ы и взять искомый.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2018-07-26T06:25:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127386#p127386</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127385#p127385" />
			<content type="html"><![CDATA[<p>Я просмотрел много тем по запросу WinHttpRequest, но из тех тем, в которых на первый взгляд читалась конкретная строка сайта, было непонятно как она это делает.<br />Сам принцип неясен, и как отобрать среди нескольких классов с одним названием нужный по номеру убывания. Т.е всего 7 например, а нужный 5-й. Как выбрать именно его?&nbsp; <br /><span class="postimg"><img src="https://imgur.com/a/pOD2TrS" alt="https://imgur.com/a/pOD2TrS" /></span></p>]]></content>
			<author>
				<name><![CDATA[kangar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39404</uri>
			</author>
			<updated>2018-07-26T05:42:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127385#p127385</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127377#p127377" />
			<content type="html"><![CDATA[<p>Сам парсинг можно сделать с помощью регулярных выражений либо через HTMLfile.<br />Лично я предпочитаю с помощью регулярных выражений, так как быстрее.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-07-25T22:37:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127377#p127377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127375#p127375" />
			<content type="html"><![CDATA[<p>OFF: <strong>Malcev</strong>, я так понимаю, что проблема не в применении WinHttpRequest, а в том, как сделать сам парсинг <img src="//forum.script-coding.com/img/smilies/smile.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>2018-07-25T22:09:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127375#p127375</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127354#p127354" />
			<content type="html"><![CDATA[<p>По WinHttpRequest информации на форуме достаточно, для того, чтобы самому что-то попробовать написать.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-07-25T18:05:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127354#p127354</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: WinHttpRequest / Поиск информации о последней теме на форуме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127343#p127343" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>kangar</strong>, оформите ссылку тегом &quot;url&quot;.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-07-25T14:52:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127343#p127343</id>
		</entry>
</feed>
