<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: два #IfWinActive срабатывание скрипта, по обоим условиям]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=10180</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10180&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: два #IfWinActive срабатывание скрипта, по обоим условиям».]]></description>
		<lastBuildDate>Sun, 23 Nov 2014 16:37:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: два #IfWinActive срабатывание скрипта, по обоим условиям]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=88598#p88598</link>
			<description><![CDATA[<p>Прочитай статью <a href="http://www.script-coding.com/AutoHotkey/Variables.1.0.46.07.html">Переменные и выражения</a>, в части &quot;Операторы в выражениях&quot; есть и эта конструкция, <em>тернарный оператор</em>.</p>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Sun, 23 Nov 2014 16:37:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=88598#p88598</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: два #IfWinActive срабатывание скрипта, по обоим условиям]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=88597#p88597</link>
			<description><![CDATA[<p>Irbis спасибо.<br /></p><div class="quotebox"><cite>Irbis пишет:</cite><blockquote><p>Для чего столько повторяющегося на 95% кода? Тем более что <strong>#IfWinActive</strong> тут и не нужен.</p></blockquote></div><p>Как видел задачу, так и записал.<br />А это я просто не понимаю:<br /></p><div class="codebox"><pre><code>Send % WinActive(&quot;Speed Dial&quot;)  ? &quot;{sc41}&quot; : &quot;^{vk57}&quot;</code></pre></div><p>вижу что она делает, но воссоздать подобную пока, что не могу.</p>]]></description>
			<author><![CDATA[null@example.com (Nikva)]]></author>
			<pubDate>Sun, 23 Nov 2014 15:34:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=88597#p88597</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: два #IfWinActive срабатывание скрипта, по обоим условиям]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=88582#p88582</link>
			<description><![CDATA[<p>Для чего столько повторяющегося на 95% кода? Тем более что <strong>#IfWinActive</strong> тут и не нужен.<br /></p><div class="codebox"><pre><code>#SingleInstance Force
#NoTrayIcon
SetTitleMatchMode, 2
Return
XButton1::
{
    KeyWait, %A_ThisHotkey%
    KeyWait, %A_ThisHotkey%, D T0.2
    If ErrorLevel
        {
        Send % WinActive(&quot;Speed Dial&quot;)  ? &quot;{sc41}&quot; : &quot;^{vk57}&quot;
        }
    Else
        {
        Sleep 200
        GetKeyState, state, XButton1, P
        if state = D
            {
            Send ^+{SC014} ; ctrl + shift + T если двойной клик и удерживаеться кнопка
            }
        else
            {
            Send ^{SC014} ; ctrl + T если двойной клик
            }
        }
    KeyWait, %A_ThisHotkey%
    Return
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Sun, 23 Nov 2014 08:33:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=88582#p88582</guid>
		</item>
		<item>
			<title><![CDATA[AHK: два #IfWinActive срабатывание скрипта, по обоим условиям]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=88578#p88578</link>
			<description><![CDATA[<p>Скрипт для браузера:<br /> XButton1<br />действия для окна &quot;Speed Dial&quot;<br />1- одиночное нажатие посылает F7<br />2- двойное нажатие посылает ctrl + T<br />3- двойное нажатие и удержание кнопки ctrl + shift + T</p><p>действия в любом окне<br />1- одиночное нажатие посылает ctrl + W<br />2- двойное нажатие посылает ctrl + T<br />3- двойное нажатие и удержание кнопки ctrl + shift + T</p><p>Проблема:<br />при двойном нажатии и удержании XButton1 в окне Speed Dial<br />срабатывает и ctrl +shift+T (как и должно быть) и ctrl+W (первое условие на одиночное нажатие во всех окнах)</p><div class="codebox"><pre><code>#SingleInstance Force
#NoTrayIcon
SetTitleMatchMode, 2

#IfWinActive Speed Dial
XButton1::
{
    ToolTip
    KeyWait, %A_ThisHotkey%
    KeyWait, %A_ThisHotkey%, D T0.1
    If ErrorLevel
        {
            Send {sc41} ; F7 если одиночный клик
        }
    Else
        {
        Sleep 200
        GetKeyState, state, XButton1, P
        if state = D
            {
            Send ^+{SC014} ; ctrl + shift + T если двойной клик и удерживаеться кнопка
            }
        else
            {
            Send ^{SC014} ; ctrl + T если двойной клик
            }
        }
    KeyWait, %A_ThisHotkey%
    Return
}
#IfWinActive
XButton1::
{
    KeyWait, %A_ThisHotkey%
    KeyWait, %A_ThisHotkey%, D T0.1
    If ErrorLevel
        {
        Send ^{vk57} ; ctrl + W если одиночный клик
        }
    Else
        {
        Sleep 200
        GetKeyState, state, XButton1, P
        if state = D
            {
            Send ^+{SC014} ; ctrl + shift + T если двойной клик и удерживаеться кнопка
            }
        else
            {
            Send ^{SC014} ; ctrl + T если двойной клик
            }
        }
    KeyWait, %A_ThisHotkey%
    Return
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Nikva)]]></author>
			<pubDate>Sat, 22 Nov 2014 22:16:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=88578#p88578</guid>
		</item>
	</channel>
</rss>
