<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14794&amp;type=atom" />
	<updated>2019-05-23T12:13:27Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14794</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134430#p134430" />
			<content type="html"><![CDATA[<p>Так проще, если не нужны левые\правые модификаторы.<br /></p><div class="codebox"><pre><code>HKToStr(HK) {
	Static Prefix := {&quot;^&quot;:&quot;Ctrl&quot;,&quot;!&quot;:&quot;Alt&quot;,&quot;+&quot;:&quot;Shift&quot;,&quot;#&quot;:&quot;Win&quot;}
	For k, v in Prefix
		Instr(HK, k) &amp;&amp; (HK := StrReplace(HK, k), M .= v &quot;+&quot;)
	Return M . (StrLen(HK) = 1 ? Format(&quot;{:U}&quot;, HK) : HK)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-05-23T12:13:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134430#p134430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134426#p134426" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Спасибо большое, помогло.</p>]]></content>
			<author>
				<name><![CDATA[Artem_Glade]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40155</uri>
			</author>
			<updated>2019-05-22T14:16:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134426#p134426</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134425#p134425" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?pid=105023#p105023">http://forum.script-coding.com/viewtopi … 23#p105023</a></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-05-22T13:49:31Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134425#p134425</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134423#p134423" />
			<content type="html"><![CDATA[<p>StringReplace?</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-05-21T19:34:43Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134423#p134423</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134422#p134422" />
			<content type="html"><![CDATA[<p>Ссылка в подписи.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-05-21T17:13:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134422#p134422</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Преобразование переменной в дргую]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134421#p134421" />
			<content type="html"><![CDATA[<p>Есть функция &quot;IniWrite&quot;, она записывает инфу в переменную файла .ini, так вот, есть в AHK функция Hotkey. Допустим мы создадим окно GUI<br /></p><div class="codebox"><pre><code>Gui, add, hotkey, x20 y10 w80 h20 vkey,
Gui, add, button, x20 y40 w80 h20 gsave, Сохранить
Gui, add, button, x20 y70 w80 h20 gcheck, Проверить
Gui, show, Center w200 h100, GUI Hotkey
return

save:
Gui Submit, Nohide
IniWrite %key%, %A_ScriptDir%/Proverka.ini, proverka, key
TrayTip, GUI Hotkey, Сохранено
return

check:
Gui Submit, Nohide
IniRead, key, %A_ScriptDir%/Proverka.ini, proverka, key
MsgBox, Клавиша будет - %key%
return</code></pre></div><p>Так, вот, вопрос вот в чём, как сделать, чтобы из этого .ini файла считывал переменную &quot;key&quot; (допустим мы в Хоткее указали сочетание клавиш - Alt + 1, в ини файл он запишет key=!1) и преобразовывал её не в !1 а в Alt + 1. <br />P.S. Мне нужно, чтобы не именно какую-то цифру или букву преобразовывало из !1 в Alt + 1, а любую букву или цифру с восклицательным знаком или^, #,+ и тд<br />Пример:<br />из !2 в Alt + 2<br />из +1 в Shift + 1<br />из ^a в Ctrl + A</p>]]></content>
			<author>
				<name><![CDATA[Artem_Glade]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40155</uri>
			</author>
			<updated>2019-05-21T16:17:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134421#p134421</id>
		</entry>
</feed>
