<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Два хоткея в одной переменной]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=11671</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11671&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Два хоткея в одной переменной».]]></description>
		<lastBuildDate>Mon, 06 Jun 2016 14:48:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104823#p104823</link>
			<description><![CDATA[<p>Получилось вот так. Поправьте мня, если не так.<br /></p><div class="codebox"><pre><code>	Hkey1 = 1
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vgam1,
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

ButtonSave:
	Gui, Submit
	
	IfNotEqual, Lastgam1,, Hotkey, % Lastgam1, off
	Lastgam1 := gam1
	
	if Hkey1 = 0
	Hotkey, % gam1, Off
	if Hkey1 = 1
	Hotkey, % gam1, gamV1, on UseErrorLevel

Return

gamV1:
	MsgBox, Тест 1
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Mon, 06 Jun 2016 14:48:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104823#p104823</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104743#p104743</link>
			<description><![CDATA[<p>Зря вы иронизируете, я прочитал справку про UseErrorLevel, но как применить в контексте не понимаю. Про следующие вопросы, как ни странно я уже спрашивал.<br /></p><div class="codebox"><pre><code>	Hkey1 = 1
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vgam1,
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

ButtonSave:
	Gui, Submit
	
	IfNotEqual, Lastgam1,, Hotkey, % Lastgam1, off
	Lastgam1 := gam1
	
	Hotkey, % gam1, gamV1, on UseErrorLevel
	
	if Hkey1 = 0
	Hotkey, % gam1, Off UseErrorLevel
	if Hkey1 = 1
	Hotkey, % gam1, On UseErrorLevel
Return

gamV1:
	MsgBox, Тест 1
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sun, 05 Jun 2016 21:29:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104743#p104743</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104741#p104741</link>
			<description><![CDATA[<p>Даже в русской справке написано про параметр <strong>UseErrorLevel</strong>. Следующий вопрос конечно про то, как бы не назначить такое же как уже есть, но и это есть на форуме, поищите получше. Ответ <a href="http://forum.script-coding.com/viewtopic.php?pid=104591#p104591">про другие клавиши</a> тоже есть в виде <a href="http://forum.script-coding.com/viewtopic.php?pid=72549#p72549">костыля</a>.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sun, 05 Jun 2016 21:12:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104741#p104741</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104739#p104739</link>
			<description><![CDATA[<p>А подскажите пожалуйста. Как избавится от ошибки не существующей переменной? Когда сохраняешь пустой хоткей.</p>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sun, 05 Jun 2016 19:23:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104739#p104739</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104735#p104735</link>
			<description><![CDATA[<p>Да, точно, ошибся.</p>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sun, 05 Jun 2016 18:31:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104735#p104735</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104734#p104734</link>
			<description><![CDATA[<p>Не знаю, у меня назначаются те что были до этого выключены.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sun, 05 Jun 2016 17:18:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104734#p104734</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104732#p104732</link>
			<description><![CDATA[<p><strong>serzh82saratov</strong><br />Спасибо, я об этом не подумал.<br />Возникла ещё одна проблема, даже не проблема, а так неприятность. После переназначения хоткея, старый хоткей выключается, и если вдруг его захочется вернуть обратно, то это не получится сделать до перезапуска скрипта. Есть идеи?</p>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sun, 05 Jun 2016 15:45:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104732#p104732</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104718#p104718</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>выключает не измененные хоткеи.</p></blockquote></div><div class="codebox"><pre><code>	Hotkey, % hot1, hotV1, on
	Hotkey, % hot2, hotV2, on</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sun, 05 Jun 2016 09:20:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104718#p104718</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104711#p104711</link>
			<description><![CDATA[<p><strong>yalanne</strong><br />Спасибо. Всё бы ни чего, но после нажатия кнопки сохранить, происходит сохранение (с записью в файл) больше одной переменной. Такой вариант не подходит, он попросту выключает не измененные хоткеи.<br /></p><div class="codebox"><pre><code>Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vhot1,
Gui, Add, Hotkey, vhot2,
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

ButtonSave:
	Gui, Submit
	
	IfNotEqual,Lasthot1,,	Hotkey, % Lasthot1, off
	Lasthot1 := hot1
	IfNotEqual,Lasthot2,,	Hotkey, % Lasthot2, off
	Lasthot2 := hot2
	
	Hotkey, % hot1, hotV1
	Hotkey, % hot2, hotV2
Return

hotV1:
	MsgBox, Тест 1
Return
hotV2:
	MsgBox, Тест 2
Return</code></pre></div><p>Пробовал так, тоже всё криво, если повторно задать хоткей, или использовать модификатор.<br /></p><div class="codebox"><pre><code>	hot1 = F2 ;прочитано из файла
	hot2 = F3 ;прочитано из файла
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vhot1 ghotG1, % hot1
Gui, Add, Hotkey, vhot2 ghotG2, % hot2
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

hotG1:
	IfNotEqual,Lasthot1,,	Hotkey, % Lasthot1, off
	Lasthot1 := hot1
Return
hotG2:
	IfNotEqual,Lasthot2,,	Hotkey, % Lasthot2, off
	Lasthot2 := hot2
Return

ButtonSave:
	Gui, Submit
	; hot1 записывается в файл
	; hot2 записывается в файл
	Hotkey, % hot1, hotV1
	Hotkey, % hot2, hotV2
Return

hotV1:
	MsgBox, Тест 1
Return
hotV2:
	MsgBox, Тест 2
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sun, 05 Jun 2016 01:30:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104711#p104711</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104674#p104674</link>
			<description><![CDATA[<div class="codebox"><pre><code>Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vhot1,
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

ButtonSave:
	Gui, Submit
	
	IfNotEqual,Lasthot1,,	Hotkey, % Lasthot1, off
	Lasthot1 := hot1
	
	Hotkey, % hot1, hotV1
Return

hotV1:
	MsgBox, Тест
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (yalanne)]]></author>
			<pubDate>Sat, 04 Jun 2016 10:13:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104674#p104674</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Два хоткея в одной переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=104669#p104669</link>
			<description><![CDATA[<p>Добрый день. Проблема в следующем. Есть окно Gui в котором сохраняются хоткеи в переменные. В общем если задать поочередно два хоткея и сохранить, то получим две горячих кнопки, которые не плохо себе работают. Как этого избежать и сделать заменяемый хоткей?<br /></p><div class="codebox"><pre><code>Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hotkey start
Gui, Add, Hotkey, vhot1,
Gui, Add, Button, Default, Save

F1:: Gui, Show, % (c := !c) ? &quot;&quot; : &quot;Hide&quot;
Return

ButtonSave:
	Gui, Submit
	Hotkey, % hot1, hotV1
Return

hotV1:
	MsgBox, Тест
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Sgy-x2)]]></author>
			<pubDate>Sat, 04 Jun 2016 06:28:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=104669#p104669</guid>
		</item>
	</channel>
</rss>
