<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: telegram_bot]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17526&amp;type=atom" />
	<updated>2022-12-23T07:27:49Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17526</id>
		<entry>
			<title type="html"><![CDATA[AHK: telegram_bot]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156116#p156116" />
			<content type="html"><![CDATA[<p>Добрый день! Возможно ли получить текст, отправляемый ботом? ( скрипт запущен на нескольких ПК, 1-ый способ записывать в блокнот, а уж из него, минуя дубликаты, в чат)</p><p>Taк получаешь чат, только отправленных сообщений боту - <a href="https://api.telegram.org/botToken/getUpdates">https://api.telegram.org/botToken/getUpdates</a></p><br /><br /><br /><div class="codebox"><pre><code>
botToken  :=  &quot;&quot;	
chatID := &quot;&quot; 


loop, files, % path_scan_invalid &quot;\*.jpg&quot;, F
	list_scan .= A_LoopFileName &quot;%0A&quot;


Telegram_Send(method := &quot;GET&quot;, URL := &quot;https://api.telegram.org/bot&quot; botToken &quot;/sendMessage?text=Нераспознанные сканы:%0A&quot; . list_scan &quot;&amp;chat_id=&quot; . chatID)
return

Telegram_Send(method, URL) {				                                		

    WinHTTP := ComObjCreate(&quot;WinHTTP.WinHttpRequest.5.1&quot;)
   	WinHTTP.Open(method, URL, false) 
	WinHTTP.SetRequestHeader(&quot;Content-Type&quot;, &quot;application/json; charset=utf-8&quot;)
	WinHTTP.Send()
	Return WinHTTP.ResponseText
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-12-23T07:27:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156116#p156116</id>
		</entry>
</feed>
