<?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=9813</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9813&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Активация \ дезактивация».]]></description>
		<lastBuildDate>Sat, 09 Aug 2014 08:17:35 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=85790#p85790</link>
			<description><![CDATA[<p>Если речь идет про деактивацию/активацию назначенных клавиш (hotkeys) и автозамен (hotstrings), то я использую такой вариант с оформлением:</p><div class="codebox"><pre><code>; Pressing Win+A once will suspend hot keys of the script. Pressing it again will unsuspend.
#a::
Suspend  ; suspend/unsuspend AHK script IMPORTANT: must be first string after &quot;#a::&quot;, so &quot;#a::&quot; will not be suspended
if (A_IsSuspended==0) 
{
  Gui, Destroy
  Gui, font, s55 cGreen, Verdana ; font size
  Gui, Color, Red
  Gui +LastFound  ; Make the GUI window the last found window for use by the line below.
  WinSet, TransColor, Red
  Gui -Caption
  Gui, Add, Text,, ON
  Gui, Show
  Sleep, 500
  Gui, Destroy
  return
}
else
{
  Gui, Destroy
  Gui, font, s55 cRed, Verdana ; font size
  Gui, Color, Green
  Gui +LastFound  ; Make the GUI window the last found window for use by the line below.
  WinSet, TransColor, Green
  Gui -Caption
  Gui, Add, Text,, OFF
  Gui, Show
  Sleep, 500
  Gui, Destroy
  return
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Li)]]></author>
			<pubDate>Sat, 09 Aug 2014 08:17:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=85790#p85790</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84896#p84896</link>
			<description><![CDATA[<p>Вариант с переменной:<br /></p><div class="codebox"><pre><code>x := 0 ; устанавливает по умолчанию статус &quot;Не активно&quot;

Vk0x70::
if x != 0
{
x = 0
MsgBox, Не активно
Return
}

if x = 0
{
x = 1
MsgBox, Активно 
}
Return
</code></pre></div><p>В этой структуре удобнее редактировать фрагменты кода. Сам использую.</p>]]></description>
			<author><![CDATA[null@example.com (Странникх)]]></author>
			<pubDate>Sat, 19 Jul 2014 02:04:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84896#p84896</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84895#p84895</link>
			<description><![CDATA[<p>Лично в своих скриптах пользуюсь найденным на данном форуме вариантом старт-пауза на одну клавишу:<br /></p><div class="codebox"><pre><code>#MaxThreadsPerHotkey, 2

Vk51::
    If A_IsPaused
    {
        Pause, Off
        Return
    }
    Else
    {
        If Running
        {
            Pause, On
        }
        Else
        {
            Running := True
            остальная часть кода
        }
    }
Return</code></pre></div><p>Ну или так</p><div class="codebox"><pre><code>#MaxThreadsPerHotkey 2 
        
vk54::
    T := !T
    While T 
        ToolTip % A_TickCount  
    return</code></pre></div><p>если MaxThreadsPerHotkey мешает:</p><div class="codebox"><pre><code>vk54::
    T := !T 
    SetTimer, Loop, -1
    return

Loop:
    While T
        ToolTip % A_TickCount  
    return</code></pre></div><p>Вот еще один вариант!<br /></p><div class="codebox"><pre><code>Vk51::
off := 1
Loop
{
    Send, {vk54 down}{vk54 up}
    Random, Rand, 10, 1000
    sleep % Rand + 100

If off = 0
Break
}
return

Vk57::
off := 0
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Центурион)]]></author>
			<pubDate>Fri, 18 Jul 2014 19:03:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84895#p84895</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84866#p84866</link>
			<description><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Всё равно непонятно. Речь о горячих клавишах, выполнении каких-то действий или другое?</p></blockquote></div><p>Именно, не так сформулировал</p>]]></description>
			<author><![CDATA[null@example.com (Olega)]]></author>
			<pubDate>Fri, 18 Jul 2014 06:13:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84866#p84866</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84864#p84864</link>
			<description><![CDATA[<p>Всё равно непонятно. Речь о горячих клавишах, выполнении каких-то действий или другое?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Fri, 18 Jul 2014 05:14:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84864#p84864</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84863#p84863</link>
			<description><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Что понимается под активацией и дезактивацией?</p></blockquote></div><p>Допустим есть скрипт... Тоесть мы делаем активацию &quot;F1::&quot;, ну и что бы дезактивация была на эту же &quot;F1&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (Olega)]]></author>
			<pubDate>Fri, 18 Jul 2014 05:08:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84863#p84863</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84862#p84862</link>
			<description><![CDATA[<p>Что понимается под активацией и дезактивацией?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Fri, 18 Jul 2014 05:02:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84862#p84862</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Активация \ дезактивация]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=84861#p84861</link>
			<description><![CDATA[<p>Как сделать активацию и дезактивацию на одну кнопку? Прошу прощение, наверно,&nbsp; глупый вопрос.</p>]]></description>
			<author><![CDATA[null@example.com (Olega)]]></author>
			<pubDate>Fri, 18 Jul 2014 04:48:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=84861#p84861</guid>
		</item>
	</channel>
</rss>
