<?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="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10518&amp;type=atom" />
	<updated>2015-03-24T12:04:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10518</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92710#p92710" />
			<content type="html"><![CDATA[<p>Почитай в справке про KeyWait и сам найдешь решение.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-03-24T12:04:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92710#p92710</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92708#p92708" />
			<content type="html"><![CDATA[<p>Я смотрел. Мне подходит код, который я выше написал. Но куда его вставить в предложенный вами?<br />Просто в конце написать:<br /></p><div class="codebox"><pre><code>  
RButton::
KeyWait, % A_ThisHotkey
  if (A_TimeSinceThisHotkey &gt;= 2000)
     Shutdown, 12
  else
     Send {RButton}</code></pre></div><p>Так будет работать?</p>]]></content>
			<author>
				<name><![CDATA[Anger666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32952</uri>
			</author>
			<updated>2015-03-24T12:02:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92708#p92708</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92705#p92705" />
			<content type="html"><![CDATA[<p>Посмотрите в этой <a href="http://forum.script-coding.com/viewtopic.php?id=1205">теме</a>, под 4ым пунктом.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-03-24T11:06:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92705#p92705</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92701#p92701" />
			<content type="html"><![CDATA[<p>Как обработать этот участок когда?</p><div class="codebox"><pre><code>  KeyWait, % A_ThisHotkey
  if (A_TimeSinceThisHotkey &gt;= 2000)
     Shutdown, 12
  else
     Send {RButton}</code></pre></div><p>Мне нужно отследить, если ПКМ нажата больше 2 сек то выключать комп.</p>]]></content>
			<author>
				<name><![CDATA[Anger666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32952</uri>
			</author>
			<updated>2015-03-24T07:28:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92701#p92701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92695#p92695" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#ifwinactive ahk_class ahk_class XBMC
RButton::Send {Backspace} ; на пульте кнопка &quot;стрелочка назад&quot; - бекспейс
LButton::Send {Enter} ; на пульте кнопка &quot;ОК&quot; - энтер
Volume_Mute::Send {F4}
#ifwinactive

#ifwinactive TotalMedia
RButton::Send {Enter} ; на пульте кнопка &quot;ОК&quot; - энтер
Volume_Mute::Send {F4}
LWin::Send {RButton}
#ifwinactive

#ifwinactive ahk_class PotPlayer
Volume_Mute::Send {F4}
#ifwinactive
</code></pre></div><p>Вот так подойдёт?</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-03-23T23:49:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92695#p92695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92694#p92694" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>Anger666</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-23T19:16:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92694#p92694</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Выполнение разных действий в зависимости от активных окон]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92693#p92693" />
			<content type="html"><![CDATA[<p>Подскажите,пожалуйста, как правильно переписать этот скрипт?</p><div class="codebox"><pre><code>RButton::
if WinActive ahk_class XBMC
  Send {Backspace} ; на пульте кнопка &quot;стрелочка назад&quot; - бекспейс
else if WinActive TotalMedia
  Send {Enter} ; на пульте кнопка &quot;ОК&quot; - энтер
else
  KeyWait, % A_ThisHotkey
  if (A_TimeSinceThisHotkey &gt;= 2000)
     Shutdown, 12
  else
     Send {RButton}
Return

LButton::
if WinActive ahk_class XBMC
  Send {Enter} ; на пульте кнопка &quot;ОК&quot; - энтер
else
  Send {LButton}
Return

Volume_Mute::
if WinActive ahk_class XBMC or WinActive TotalMedia or WinActive ahk_class PotPlayer
  Send {!F4} ; на пульте кнопка &quot;выключить кромкость(нижняя)&quot; - выход
else
  Send {Volume_Mute}
Return

LWin::
if WinActive ahk_class XBMC
  Send {VKB4} ; на пльте кнопка &quot;меню&quot; - контекстное меню
else if WinActive TotalMedia
  Send {RButton} ; на пльте кнопка &quot;меню&quot; - контекстное меню
else
  Send {LWin}
Return

Volume_Up::
if WinActive ahk_class XBMC
  Send {z} ; на пульте кнопка &quot;увеличить громкость&quot; - добавить канал в избранное или изменить кроп
else if WinActive ahk_class PotPlayer
  Send {!a} ; на пульте кнопка &quot;увеличить громкость&quot; - переключить аудиодорожку
else
  Send {Volume_Up}
Return

Volume_Down::
if WinActive ahk_class XBMC
  Send {y} ; на пульте кнопка &quot;уменьшить громкость&quot; - удалить канал из избранного
else if WinActive ahk_class PotPlayer
  Send {!h} ; на пульте кнопка &quot;уменьшить громкость&quot; - вкл/выкл субтитры
else
  Send {Volume_Down}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Anger666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32952</uri>
			</author>
			<updated>2015-03-23T19:11:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92693#p92693</id>
		</entry>
</feed>
