<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: массовое Сравнение переменных]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=14701</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14701&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: массовое Сравнение переменных».]]></description>
		<lastBuildDate>Mon, 08 Apr 2019 12:49:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: массовое Сравнение переменных]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=133446#p133446</link>
			<description><![CDATA[<div class="codebox"><pre><code>StringCaseSense, Locale

text1 = Текст последнего сообщения
idsms1 = idsms1
text2 = Текст последнего сообщения
idsms2 = idsms2
text3 = Текст последнего Помощь сообщения
idsms3 = idsms3
text4 = Текст последнего сообщения
idsms4 = idsms4
text5 = Текст последнего сообщения Помощь
idsms5 = idsms5

LastMatch := 0  ;	True - Последнее совпадение.
While (A_Index &lt;= 5) &amp;&amp; (!InStr(text%A_Index%, &quot;помощь&quot;) || (LastMatch, idsms := idsms%A_Index%))
	Continue 
MsgBox % idsms</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Mon, 08 Apr 2019 12:49:18 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=133446#p133446</guid>
		</item>
		<item>
			<title><![CDATA[AHK: массовое Сравнение переменных]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=133445#p133445</link>
			<description><![CDATA[<p>Привет еще раз форумчане, пишу простенького бота для беседы вк, и столкнулся с проблемой в написании кода:<br /></p><div class="codebox"><pre><code>

Token := &quot;VKTOKEN&quot;
ID := &quot;147&quot; ;- Айди переписки беседы
count := &quot;5&quot; ; сколько сообщений возвращать , мне нужно 5 последних


start: 
loop {
ComObjError(false) 
whr := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;) 
whr.Open(&quot;POST&quot;, &quot;https://api.vk.com/method/messages.getHistory?count=&quot; count &quot;&amp;chat_id=&quot; ID &quot;&amp;access_token=&quot; Token &quot;&amp;v=5.85&quot;, true) 
whr.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36&quot;) 
whr.SetRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;) 
whr.Send() 
whr.WaitForResponse() 
jsontext := % whr.ResponseText
JSON = 
(LTrim Join 
%jsontext% 
) 
htmldoc := ComObjCreate(&quot;htmlfile&quot;) 
Script := htmldoc.Script 
Script.execScript(&quot; &quot;, &quot;JScript&quot;) 
oJSON := Script.eval(&quot;(&quot; . JSON . &quot;)&quot;)
;-----последнее
text := % oJSON.response.items.0.text ; - Текст последнего сообщения
from := % oJSON.response.items.0.from_id ; - Кто написал (его айди) последнее сообщене
idsms := % oJSON.response.items.0.id ; - айди последнего сообщения
;-----последнее перед ним 1
text1 := % oJSON.response.items.1.text ; - Текст последнего сообщения
from1 := % oJSON.response.items.1.from_id ; - Кто написал (его айди) последнее сообщене
idsms1 := % oJSON.response.items.1.id ; - айди последнего сообщения
;-----последнее перед ним 2
text2 := % oJSON.response.items.2.text ; - Текст последнего сообщения
from2 := % oJSON.response.items.2.from_id ; - Кто написал (его айди) последнее сообщене
idsms2 := % oJSON.response.items.2.id ; - айди последнего сообщения
;-----последнее перед ним 3
text3 := % oJSON.response.items.3.text ; - Текст последнего сообщения
from3 := % oJSON.response.items.3.from_id ; - Кто написал (его айди) последнее сообщене
idsms3 := % oJSON.response.items.3.id ; - айди последнего сообщения
;-----последнее перед ним 4
text4 := % oJSON.response.items.4.text ; - Текст последнего сообщения
from4 := % oJSON.response.items.4.from_id ; - Кто написал (его айди) последнее сообщене
idsms4 := % oJSON.response.items.4.id ; - айди последнего сообщения

; И так есть у нас 5 сообщений их авторы и текста сообщений
; Как проверить каждый TextN и если нашел слово &quot;Помощь&quot; то выбрать именно айди этого сообщения idsmsN

if text contains то омощь,/help
{
goto helpme
}
goto start

helpme:
msgbox 123
goto start

</code></pre></div><p>И так есть у нас 5 сообщений их авторы и текста сообщений,<br />как проверить каждый TextN и если нашел слово &quot;Помощь&quot; то выбрать именно айди этого сообщения idsmsN, затратив на это меньше кода?</p><p>ps. Скрипт json идеален! :-)</p>]]></description>
			<author><![CDATA[null@example.com (wladkokopops)]]></author>
			<pubDate>Mon, 08 Apr 2019 12:33:06 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=133445#p133445</guid>
		</item>
	</channel>
</rss>
