<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: HotKey]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=9168</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9168&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: HotKey».]]></description>
		<lastBuildDate>Wed, 22 Jan 2014 09:06:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79412#p79412</link>
			<description><![CDATA[<div class="codebox"><pre><code>
Gui, Add, Hotkey, vMyHotkey 
Gui, add, edit, vEdit 
Gui, Add, Hotkey, vMy
Gui, add, edit, vEd
Gui, add, button, gsave, save
Gui, show
return

Save: 
    Hotkey, %MyHotKey%, Off, UseErrorLevel
    Hotkey, %My%, Off, UseErrorLevel
    Gui, submit, nohide
    Hotkey, %MyHotKey%, play, On, UseErrorLevel
    Hotkey, %My%, plays, On, UseErrorLevel
    return

play:
    GuiControlGet, Edit
    msgbox %Edit%
    return
Plays:
    GuiControlGet, Ed
    msgbox, %Ed%
    return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Wed, 22 Jan 2014 09:06:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79412#p79412</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79378#p79378</link>
			<description><![CDATA[<p>Возникла новая проблема. Некорректно работает скрипт, если есть 2 горячих клавиши. Если настроить вторую горячую клавишу, не настраивая первую, то скрипт работать не будет. Но если настроить 2 горячие клавиши, то скрипт заработает. Вот код:<br /></p><div class="codebox"><pre><code>Gui, Add, Hotkey, vMyHotkey 
Gui, add, edit, vEdit 
Gui, Add, Hotkey, vMy
Gui, add, edit, vEd
Gui, add, button, gsave, save
Gui, show
return

Save:
    if MyHotKey !=
        Hotkey, %MyHotKey%, Off
    GuiControlGet, MyHotKey
    if MyHotKey =
        return
    Hotkey, %MyHotKey%, play, On
    
    if My !=
        Hotkey, %My%, Off
    GuiControlGet, My
    if My =
        return
    Hotkey, %My%, plays, On
    return

play:
    GuiControlGet, Edit
    msgbox %Edit%
    return
Plays:
    GuiControlGet, Ed
    msgbox, %Ed%
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (antosha)]]></author>
			<pubDate>Mon, 20 Jan 2014 17:35:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79378#p79378</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79373#p79373</link>
			<description><![CDATA[<p>А все, кажется разобрался.</p>]]></description>
			<author><![CDATA[null@example.com (antosha)]]></author>
			<pubDate>Mon, 20 Jan 2014 16:29:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79373#p79373</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79372#p79372</link>
			<description><![CDATA[<p>Всем спасибо. Но вот возникла еще одна проблема, час с нею мучился, ничего не придумал. Если не указать горячую клавишу и нажать &quot;Save&quot;, то будет ошибка. Как ее можно исправить?</p>]]></description>
			<author><![CDATA[null@example.com (antosha)]]></author>
			<pubDate>Mon, 20 Jan 2014 16:27:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79372#p79372</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79368#p79368</link>
			<description><![CDATA[<p>Пару поправок, если позволите. </p><p>Думаю что лишняя строка:<br /></p><div class="codebox"><pre><code>
Hotkey, %MyHotKey%, On</code></pre></div><p>---<br /></p><div class="codebox"><pre><code>if MyHotKey</code></pre></div><p>Если хоткеем будет клавиша &quot;0&quot;, то она не отключится.</p><p>Хотя можно и совсем упразднить:<br /></p><div class="codebox"><pre><code>

Save: 
    Hotkey, %MyHotKey%, Off, UseErrorLevel
    GuiControlGet, MyHotKey 
    Hotkey, %MyHotKey%, play, On
    return
</code></pre></div><p>---<br />Ну и для ТС:<br /></p><div class="codebox"><pre><code>play:
msgbox %Edit%</code></pre></div><p>тут надо </p><div class="codebox"><pre><code>GuiControlGet, Edit</code></pre></div><p>можно нажать <span class="bbu">save</span> потом ввести новый текст, но в msgbox его уже не будет при нажатии хоткея.<br />---</p><div class="codebox"><pre><code>
Gui, Add, Hotkey, vMyHotkey 
Gui, add, edit, vEdit 
Gui, add, button, gsave, save
Gui, show
return

Save:
    if MyHotKey !=
        Hotkey, %MyHotKey%, Off
    GuiControlGet, MyHotKey 
    Hotkey, %MyHotKey%, play, On
    return

play:
    GuiControlGet, Edit
    msgbox %Edit%
    return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Mon, 20 Jan 2014 14:02:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79368#p79368</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79367#p79367</link>
			<description><![CDATA[<div class="quotebox"><cite>YMP пишет:</cite><blockquote><p>Назначьте предыдущей комбинации метку с командой Return.</p></blockquote></div><p>А потом второму хоткею тоже Return, затем третьему и т.д.? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><div class="codebox"><pre><code>Gui, Add, Hotkey, vMyHotkey,
Gui, add, edit, vEdit,
Gui, add, button, gsave, save
Gui, show
return

Save:
if MyHotKey
   Hotkey, %MyHotKey%, Off
Gui, submit, nohide
Hotkey, %MyHotKey% , play
Hotkey, %MyHotKey%, On
return
play:
msgbox %Edit%</code></pre></div><p><strong>antosha</strong>, если копируешь примеры из справки, или из другого источника, изучи какие параметры и за что отвечают.<br />Что в твоем примере делает последний параметр?<br /></p><div class="quotebox"><blockquote><p>Hotkey, %MyHotKey% , play, <span style="color: red">pn</span></p></blockquote></div><p>Upd: <strong>YMP</strong> сам себя уже поправил.</p>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Mon, 20 Jan 2014 13:29:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79367#p79367</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79366#p79366</link>
			<description><![CDATA[<p>Так же, как новой назначаете. Хотя ведь у команды Hotkey есть ещё опция Off, которой можно отключать.</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Mon, 20 Jan 2014 13:20:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79366#p79366</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79365#p79365</link>
			<description><![CDATA[<p>Я не понял как ее назначить.</p>]]></description>
			<author><![CDATA[null@example.com (antosha)]]></author>
			<pubDate>Mon, 20 Jan 2014 12:55:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79365#p79365</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79364#p79364</link>
			<description><![CDATA[<p>Назначьте предыдущей комбинации метку с командой Return.</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Mon, 20 Jan 2014 10:42:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79364#p79364</guid>
		</item>
		<item>
			<title><![CDATA[AHK: HotKey]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=79363#p79363</link>
			<description><![CDATA[<p>Приветствую всех. Начал изучать ahk и решил пока писать мини-скрипты для моего обучения. Наткнулся на такую проблему. Я ставлю нужную мне комбинацию и скрипт работает, но когда я меняю эту клавишу, то предыдущая клавиша не отключается, то есть теперь у меня работают 2 комбинации. В чем проблема?<br /></p><div class="codebox"><pre><code>Gui, Add, Hotkey, vMyHotkey,
Gui, add, edit, vEdit,
Gui, add, button, gsave, save
Gui, show
return

Save:
Gui, submit, nohide
Hotkey, %MyHotKey% , play, pn
return
play:
msgbox %Edit%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (antosha)]]></author>
			<pubDate>Mon, 20 Jan 2014 10:00:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=79363#p79363</guid>
		</item>
	</channel>
</rss>
