<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GuiControl и обнуление предыдущих переменных]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16673&amp;type=atom" />
	<updated>2021-10-20T17:57:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16673</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150176#p150176" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> именно об этом я и подумал ... <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />AHK почти как Perl - многое может!</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T17:57:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150176#p150176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150175#p150175" />
			<content type="html"><![CDATA[<p>Тогда думаю АХК в этом поможет как раз.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-20T17:56:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150175#p150175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150174#p150174" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> в сети есть конвертеры подобного рода, но они старые и многие не работают, к тому же на кириллице многие глючат - крякозябы выдают.<br />Нашел один &quot;OTConvertIt&quot;, который что-то делает, но тоже старый и функционал не устраивает.<br />Хочу еще и мультистрочную конвертацию в этот код запихнуть ...</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T17:43:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150174#p150174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150173#p150173" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> иногда мне нужно быстро конвертировать данные реестра из hex и обратно.<br />Это для модернизации образа WinPE нужно, где используются *.reg файлы.<br />Долго объяснять, а этого я не умею делать ...<br />Теперь буду доделывать этот код для обратной конвертации - из текста в hex для реестра.</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T17:35:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150173#p150173</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150172#p150172" />
			<content type="html"><![CDATA[<p>Только вот какой смысл хранить в реестре в хексе? Можно и в виде строк хранить.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-20T17:15:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150172#p150172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150171#p150171" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> ну я же писал, что не умею объяснять. Как собака - все понимаю, но сказать не могу! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />БОЛЬШУЩЕЕ БЛАГОДАРЮ за помощь!<br />Теперь все хорошо работает.</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T17:01:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150171#p150171</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150170#p150170" />
			<content type="html"><![CDATA[<p>Ну вот вам и нужно было объяснить, что при вставке hex-кода в верхнее поле должен появляться декодированный текст в нижнем. Если так, то можно было проще:<br /></p><div class="codebox"><pre><code>RegHex =
(
  54,00,65,00,73,00,74,00,3a,00,20,00,22,00,45,00,6e,00,67,00,6c,00,69,\
  00,73,00,68,00,20,00,61,00,6e,00,79,00,20,00,74,00,65,00,78,00,74,00,22,00,\
  20,00,2b,00,20,00,20,04,43,04,41,04,41,04,3a,04,38,04,39,04,20,00,42,04,35,\
  04,3a,04,41,04,42,04,3a,00,20,00,22,00,11,04,43,04,31,04,3b,04,4c,04,20,00,\
  13,04,43,04,3c,04,22,00,00,00,00,00
)

Gui Add, Edit, vSrcHex gGetTxt w600 h200, % RegHex ; Вставить hex из *reg файла
Gui Add, Edit, vOutTxt  w600 h200
Gui Add, Button, gReset, Очистить все
Gui Show,, % ProgName
Return

Reset:
 GuiControl,, SrcHex
 GuiControl,, OutTxt
Return

GuiClose:
ExitApp

GetTxt(){
 GuiControlGet, SrcHex
 SrcHex := RegExReplace(SrcHex, &quot;[^a-f\d]&quot;)
 Loop % StrLen(SrcHex) /2 {
  Txt .= Chr(&quot;0x&quot; SubStr(SrcHex, A_index *4 -1, 2) SubStr(SrcHex, A_index *4 -3, 2))
  }
 GuiControl,, OutTxt, % Txt
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-20T16:55:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150170#p150170</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150169#p150169" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> ... блин!!! Перепутал ... [Ctrl + V] конечно же!!!!<br />Просто перепутал, когда писал. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Я не думаю, когда нажимаю клавиши и все само-собой происходит.</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T16:48:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150169#p150169</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150168#p150168" />
			<content type="html"><![CDATA[<p>Странно, обычно по умолчанию в Windows по Ctrl + C осуществляется копирование, а вставка по Ctrl + V.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-20T16:47:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150168#p150168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150167#p150167" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> ага ... у меня так работает.<br />А разве иначе???</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T16:45:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150167#p150167</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150166#p150166" />
			<content type="html"><![CDATA[<p>А, я понял, вы думаете, что вставка текста осуществляется по Ctrl + C.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-20T16:41:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150166#p150166</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150165#p150165" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> благодарю за помощь!<br />Уже решили вопрос, спасибо огромное!</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T16:39:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150165#p150165</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150164#p150164" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>BlackCat пишет:</cite><blockquote><p>перед вставкой [Ctrl + C] нужно ткнуть мышой в верхний Edit, чтобы он активировался</p></blockquote></div><p>Так он и был изначально активным.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-20T16:38:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150164#p150164</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150163#p150163" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> ну да, функцию не довел до ума, а копал не в том месте! ... Совсем тормознул! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Большущее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[BlackCat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41382</uri>
			</author>
			<updated>2021-10-20T16:38:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150163#p150163</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GuiControl и обнуление предыдущих переменных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150162#p150162" />
			<content type="html"><![CDATA[<p>Всё настолько просто, что даже смешно:</p><div class="codebox"><pre><code>RegHex =
(
  54,00,65,00,73,00,74,00,3a,00,20,00,22,00,45,00,6e,00,67,00,6c,00,69,\
  00,73,00,68,00,20,00,61,00,6e,00,79,00,20,00,74,00,65,00,78,00,74,00,22,00,\
  20,00,2b,00,20,00,20,04,43,04,41,04,41,04,3a,04,38,04,39,04,20,00,42,04,35,\
  04,3a,04,41,04,42,04,3a,00,20,00,22,00,11,04,43,04,31,04,3b,04,4c,04,20,00,\
  13,04,43,04,3c,04,22,00,00,00,00,00
)

Gui Add, Edit, vSrcHex gGetTxt w600 h200, % RegHex ; Вставить hex из *reg файла
Gui Add, Edit, vOutTxt  w600 h200
Gui Add, Button, gReset, Очистить все
Gui Show,, % ProgName
Return

GetTxt:
 Gui Submit, NoHide
 GuiControl,, OutTxt, % GetTxt(SrcHex)
Return

Reset:
 Gui Submit, NoHide
 GuiControl,, SrcHex
 GuiControl,, OutTxt
Return

GuiClose:
ExitApp

GetTxt(SrcHex){
 global
 Txt=
 SrcHex := RegExReplace(SrcHex, &quot;m),|\s|\\\n&quot;, &quot;&quot;)
 Loop % StrLen(SrcHex) /2 {
  Txt .= Chr(&quot;0x&quot; SubStr(SrcHex, A_index *4 -1, 2) SubStr(SrcHex, A_index *4 -3, 2))
  }
Return Txt
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-20T16:35:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150162#p150162</id>
		</entry>
</feed>
