<?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=10944&amp;type=atom" />
	<updated>2015-09-12T17:15:49Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10944</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97384#p97384" />
			<content type="html"><![CDATA[<p>Спасибо большое.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-12T17:15:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97384#p97384</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97383#p97383" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>text = ff
MsgBox % Format(&quot;{:#x}&quot;, &quot;0x&quot; text) + 0

hex = 0xff
MsgBox % Format(&quot;{:x}&quot;, hex)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-12T17:13:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97383#p97383</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97382#p97382" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>msgbox % LTrim(0x50F,&quot;0x&quot;)</code></pre></div><p>Не знал что все так просто. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Спасибо.</p><p>А может и для первой функции есть более легкий аналог?</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-12T17:11:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97382#p97382</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97381#p97381" />
			<content type="html"><![CDATA[<p>А почему просто не прилепить или отрезать &quot;0x&quot;?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-12T17:04:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97381#p97381</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97380#p97380" />
			<content type="html"><![CDATA[<p>В первой функции текст F05 конвертируется в 0xF05 с которой работают математические действия.( место F05 может быть любое hex число).</p><p>А во второй функции должно из 0xF05 быть ответом F05 в виде текста.<br />В этой функции просто перебираются байты от младшего значения и преобразуются в текст. После того как loop прошел все байты (5-0-F)&nbsp; он должен остановится, вот как только отловить старшее значение?</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-12T16:53:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97380#p97380</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97379#p97379" />
			<content type="html"><![CDATA[<p>Непонятно. Напишите примеры, было - стало.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-12T16:10:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97379#p97379</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Получение шестнадцатеричного числа из текста и наоборот.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97378#p97378" />
			<content type="html"><![CDATA[<p>Что бы получить число из текста у меня получилось<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>SetFormat, IntegerFast, hex
GetHexInStr(String)
{
    hex := {1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15}
    loop,parse,String
        e+= (hex[A_LoopField]&lt;&lt;((StrLen(String)-A_Index)*4))
    return e
}

msgbox % GetHexInStr(&quot;50F&quot;) + 0</code></pre></div></div></div><p>А вот что бы наоборот, возникли трудности<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>SetFormat, IntegerFast, hex
GetStrInInt(Integer)
{
    hex := {0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:&quot;A&quot;,11:&quot;B&quot;,12:&quot;C&quot;,13:&quot;D&quot;,14:&quot;E&quot;,15:&quot;F&quot;}
    loop
        msgbox % hex[(Integer&gt;&gt;(A_Index-1)*4)&amp;0xF]
}


msgbox % GetStrInInt(0x50F)</code></pre></div></div></div><p>Проблема в том то что я не знаю как определить размер этого числа для остоновки цикла.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-12T16:00:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97378#p97378</id>
		</entry>
</feed>
