<?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=12042&amp;type=atom" />
	<updated>2016-09-28T02:55:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12042</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Ошибка в коде]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108057#p108057" />
			<content type="html"><![CDATA[<p>Версия ahk старая.<br />Обновить тут можно:<br /><a href="http://ahkscript.org">клик</a></p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2016-09-28T02:55:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108057#p108057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Ошибка в коде]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108054#p108054" />
			<content type="html"><![CDATA[<p><strong>yalanne</strong> При запуске пишет Сall to nonexistent function c указанием на 5 строку.<br />Собственно, я уже сам со своим кодом разобрался, но спасибо за участие)</p>]]></content>
			<author>
				<name><![CDATA[NektoN95]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32518</uri>
			</author>
			<updated>2016-09-27T19:05:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108054#p108054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Ошибка в коде]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108052#p108052" />
			<content type="html"><![CDATA[<p>Этот результат должен быть?<br /></p><div class="codebox"><pre><code>String := &quot;75abdb0c192352a4097cd13faf107baaf361d53aac12&quot;
Const := 0x42
loop % StrLen(String)//2
{
	Out := Format(&quot;{:#x}&quot;, &quot;0x&quot;	SubStr(String, A_Index*2-1,2)	)
	toappend := Format(&quot;{:02x}&quot;,	out + const	)
	msgbox % Format(&quot;{:02x}&quot;,	out ) &quot;+&quot; Format(&quot;{:02x}&quot;,	const ) &quot;=&quot; toappend
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2016-09-27T17:45:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108052#p108052</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Ошибка в коде]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108051#p108051" />
			<content type="html"><![CDATA[<p>Вот кусок кода, шифрующий заданную строку:<br /></p><div class="codebox"><pre><code>String := &quot;75abdb0c192352a4097cd13faf107baaf361d53aac12&quot;
While Mod(StrLen(String), 2)
    String := &quot;0&quot; String
Loop % StrLen(String)/2
	{
	if toappend != &quot;&quot;
	LastOut := toappend ;сохраняем результат прошлой интерации цикла, если она не первая
   	Out := &quot;0x&quot; SubStr(String, A_Index*2-1, 2) ;группируем строку по 2 знака и добавляем префикс 16ричного числа
	const := 0x42 ;задаем константу для шифровки первой группы
	msgbox % out &quot;+&quot; const &quot;=&quot; out + const 
	if LastOut = &quot;&quot;
	toappend := out + const ;шифруем первую группу
	else
	toappend := out + LastOut ;шифруем все прочие
	msgbox %toappend%
	VarSetCapacity(toappend,65,0)
	DllCall(&quot;msvcrt\_i64toa&quot;, Int64,toappend, Str,toappend, Int,16) ;конвертируем результат в 16ричное число
	msgbox %toappend%
	RegExMatch(toappend, &quot;.{2,2}$&quot;, toappend) ;оставляем только последние 2 цифры и добавляем префикс
	toappend := &quot;0x&quot; toappend
	MsgBox %toappend%
	}</code></pre></div><p>Начиная со строки if LastOut = &quot;&quot; результат функции где-то теряется. Причем в предшествующем msgbox&#039;e все складывается чудно, а вот под if&#039;кой - нет. Что за хрень?</p><p>ЗЫ В строке предназначенной для обрезки 2 последних цифр была ошибка, исправил. Впрочем функция по-прежнему не работает.</p>]]></content>
			<author>
				<name><![CDATA[NektoN95]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32518</uri>
			</author>
			<updated>2016-09-27T16:36:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108051#p108051</id>
		</entry>
</feed>
