<?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=15320&amp;type=atom" />
	<updated>2020-04-22T20:43:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15320</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: разложение строки на числа]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139123#p139123" />
			<content type="html"><![CDATA[<p>Неа, перемудрил, так производительнее.<br /></p><div class="codebox"><pre><code>
color1 := 0xFFFFF5
color2 := 0xFEFDFF 
 
Loop % 3 + (r := 0, x := color1 ^ color2) 
	b := (8 * (A_Index - 1)), (r += (x &amp; 0xff &lt;&lt; b) &gt;&gt; b) 

MsgBox % r
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-04-22T20:43:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139123#p139123</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: разложение строки на числа]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139122#p139122" />
			<content type="html"><![CDATA[<p>Класс! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-04-22T20:36:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139122#p139122</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: разложение строки на числа]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139121#p139121" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>color1 := 0xFFFFF5
color2 := 0xFEFDFF

While (b := (8 * (A_Index - 1))) &lt; 17
	r += ((color1 ^ color2) &amp; 0xff &lt;&lt; b) &gt;&gt; b  
	
MsgBox % r</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-04-22T20:17:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139121#p139121</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: разложение строки на числа]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139119#p139119" />
			<content type="html"><![CDATA[<p>Например, так можно:<br /></p><div class="codebox"><pre><code>color1 := 0xFFFFF5
color2 := 0xFEFDFF

VarSetCapacity(buff, 8)
NumPut(color2, NumPut(color1, buff, &quot;UInt&quot;), &quot;UInt&quot;)
Loop 3
   diff += Abs(*(&amp;buff + A_Index - 1) - *(&amp;buff + A_Index + 3))
MsgBox, % diff</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-04-22T18:16:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139119#p139119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: разложение строки на числа]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139113#p139113" />
			<content type="html"><![CDATA[<p>Здравствуйте. У меня есть 2 цвета. Мне нужно понять как сильно они отличаются друг от друга. <br />Пример:<br />color1 := 0xFFFFF5<br />color2 := 0xFEFDFF<br />dif := color1 - color2 -&gt; abs(FF - FE) + abs(FF - FD) + abs(F5 - FF) -&gt; 1 + 2 + 10 = 13; результат &quot;13&quot;</p>]]></content>
			<author>
				<name><![CDATA[Ilrus]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40771</uri>
			</author>
			<updated>2020-04-22T09:06:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139113#p139113</id>
		</entry>
</feed>
