<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Отправка сообщения в телеграм]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17561&amp;type=atom" />
	<updated>2023-01-16T09:36:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17561</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отправка сообщения в телеграм]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156408#p156408" />
			<content type="html"><![CDATA[<p><strong>Skypezadrot</strong>, добро пожаловать на форум! Ознакомьтесь, пожалуйста, с <a href="https://forum.script-coding.com/misc.php?action=rules">Правилами</a>, отредактируйте свой пост. Обратите внимание на <a href="https://forum.script-coding.com/misc.php?action=rules#literacy">точки</a> в конце предложений.<br />Замечу также, что вы обнаружены в базе спамеров.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-01-16T09:36:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156408#p156408</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Отправка сообщения в телеграм]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156407#p156407" />
			<content type="html"><![CDATA[<p>Привет! Столкнулся с проблемой, взял код пятилетней давности с одной из тем, решил протестировать, вставил в текстовый документ, запускаю и получаю ошибку (на картинке).</p><p>Помогите пожалуйста выяснить в чем проблема или же поделитесь если у кого-то есть подобный код для отправки сообщения в телеграм бота. Спасибо за любую обратную связь!</p><div class="codebox"><pre><code>bot_token := &quot;бот токен&quot;
Global chat_id := &quot;чат айди&quot;
Global msg_api := Format(&quot;https://api.telegram.org/bot{1}/sendMessage&quot;, bot_token)

PostMsg(&quot;&lt;b&gt;Привет мир!!!&lt;/b&gt;\n&lt;i&gt;Категория №1&lt;/i&gt;\n&lt;code&gt;IP = 192.168.0.1&lt;/code&gt;&quot;)

PostMsg(msg_text, parse_mode := &quot;HTML&quot;) {
	WinHttpObj := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
	WinHttpObj.Open(&quot;POST&quot;, msg_api)
	WinHttpObj.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0&quot;)
	WinHttpObj.SetRequestHeader(&quot;Content-Type&quot;, &quot;application/json; charset=UTF-8&quot;)
	mJson := Format(&quot;{ &quot;&quot;chat_id&quot;&quot;: &quot;&quot;{1}&quot;&quot;, &quot;&quot;text&quot;&quot;: &quot;&quot;{2}&quot;&quot;, &quot;&quot;parse_mode&quot;&quot; : &quot;&quot;{3}&quot;&quot; }&quot;, chat_id, msg_text, parse_mode) ; тут выскакивает ошибка (см. скриншот)
	WinHttpObj.Send(mJson)
}</code></pre></div><p>Error: Missing space or operator before this.</p>]]></content>
			<author>
				<name><![CDATA[Skypezadrot]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42973</uri>
			</author>
			<updated>2023-01-16T06:48:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156407#p156407</id>
		</entry>
</feed>
