<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK:  Как динамически переключать блок #IfWinActive]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7101&amp;type=atom" />
	<updated>2012-04-15T14:46:51Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7101</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59318#p59318" />
			<content type="html"><![CDATA[<p>Да, ещё.<br />Работает Punto Switcher мной исправленный (убран/исправлен баг с девником) все игры стоят в исключениях у него.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-15T14:46:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59318#p59318</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59315#p59315" />
			<content type="html"><![CDATA[<p><strong><a href="http://forum.script-coding.com/profile.php?id=25792">Grey</a></strong> курсор есть, я проверял на играх Mass Effect, Dragon Age и т.д.&nbsp; - все работает, а вот в <strong>Dungeon Siege 2 - Broken World</strong> нет. Правда я это обхожу так:<br />-&nbsp; сворачиваю игру (ALt-Tab);<br />-&nbsp; нажимаю на клавиши переключения;<br />-&nbsp; обратно разворачиваю игру (ALt-Tab).<br />Так всё нормально срабатывает.</p><p><strong><a href="http://forum.script-coding.com/profile.php?id=26105">creature.ws</a></strong> попробую по таймеру, а про <em>&quot;Я и правда не знаю как это обойти.&quot;</em> я подумал может как то можно задать приоритет обработки клавиатуры для AHK.</p><p>OS Win 7 SP1 x64</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-15T13:58:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59315#p59315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59311#p59311" />
			<content type="html"><![CDATA[<p>2 <strong>Indomito</strong> Не играю в такие игры, потому вопрос: в самой игре (не просредственно геймплэй) есть курсор? К примеру вот мой любимый CS:S, если не в меню, то в место курсора перекрестье оружия, ну в общем вопрос думаю понятен.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-04-15T13:37:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59311#p59311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59309#p59309" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>И вот такой код не срабатывает</p></blockquote></div><div class="codebox"><pre><code>#Persistent
SetTimer GameKeyOnOff, 3500
GameKeyOnOff:
vGameKey := !vGameKey
if (vGameKey)
  msgbox 0,Games Key,`t -=- ON -=- `n `n Игровые клавиши АКтивированы ,3
 else
  msgbox 0,Games Key, `t  -=- OFF  -=- `n `n Игровые клавиши ДЕактивированы,3
return</code></pre></div><p>А у меня срабатывает. <br /></p><div class="quotebox"><blockquote><p>Я и правда не знаю как это обойти.</p></blockquote></div><p>Что «это»?</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-04-15T13:04:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59309#p59309</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59304#p59304" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/profile.php?id=26105">creature.ws</a> как оказалось задача решена частично.<br />Скажем для калькулятора всё работает OK, достаточно скажем любого сочетания от Win+F8 до ScrolLock, а эти блоки делались именно для игр, игры без защиты, т.е. не OnLine. И вот такой код не срабатывает: </p><div class="codebox"><pre><code>GameKeyOnOff:
vGameKey := !vGameKey
if (vGameKey)
  msgbox 0,Games Key,`t -=- ON -=- `n `n Игровые клавиши АКтивированы ,3
 else
  msgbox 0,Games Key, `t  -=- OFF  -=- `n `n Игровые клавиши ДЕактивированы,3  
return</code></pre></div><p>может что то можно сделать? <br />Например повысить приоритет для данного скрипта или что то иное?<br /><strong>MsgBox</strong> тут не причём - я проверял.</p><p>P.S. Я и правда не знаю как это обойти.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-15T11:44:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59304#p59304</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59252#p59252" />
			<content type="html"><![CDATA[<p>Спасибо.<br />Задача решена.</p><p>P.S. OFF на OFF <em>&quot;OFF: Это очередная ваша тема для «поговорить за жизнь»?&quot;</em> я и правда не мог понять конструкцию, так что... это не про &quot;жизнь&quot;. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-14T08:40:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59252#p59252</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59251#p59251" />
			<content type="html"><![CDATA[<p>OFF: Это очередная ваша тема для «поговорить за жизнь»?</p><div class="codebox"><pre><code>;-----BEGIN--Для Dungeon Siege II
#If var &amp;&amp; WinActive(&quot;Dungeon Siege II&quot;)
SetTitleMatchMode, 2
 
RShift::
LShift::
CapsLock::
   Send, {RButton Down}
   KeyWait, % A_ThisHotkey
   Send, {RButton Up}
Return
 
RCtrl::
LCtrl::
   Send, {LButton Down}
   KeyWait, % A_ThisHotkey
   Send, {LButton Up}
Return
 
#IfWinActive
;-----END Для Dungeon Siege II

Xbutton2::var := !var</code></pre></div><div class="quotebox"><blockquote><p>и надо сделать что бы он перестал отрабатывать клавиши.</p></blockquote></div><p>— Сделано. При <strong>var = false </strong>«блок» перестаёт «обрабатываться»</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-04-14T08:37:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59251#p59251</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59250#p59250" />
			<content type="html"><![CDATA[<p>Это куда поставить? Вместо <strong>#IfWinActive ,Dungeon Siege II,</strong> ? <br />Просто не очень понятно на что реагирует директива <strong>#If False &amp;&amp; WinActive(&quot;Dungeon Siege II&quot;)</strong></p><p>Можно пример использования, по какой то клавише? Ну например Win+F8</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-14T08:29:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59250#p59250</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59248#p59248" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>#If False &amp;&amp; WinActive(&quot;Dungeon Siege II&quot;)</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-04-14T08:22:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59248#p59248</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:  Как динамически переключать блок #IfWinActive]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=59246#p59246" />
			<content type="html"><![CDATA[<p>Есть такой фрагмент </p><div class="codebox"><pre><code>;-----BEGIN--Для Dungeon Siege II
#IfWinActive ,Dungeon Siege II,
SetTitleMatchMode, 2

RShift::
LShift::
CapsLock::
   Send, {RButton Down}
   KeyWait, % A_ThisHotkey
   Send, {RButton Up}
Return

RCtrl::
LCtrl::
   Send, {LButton Down}
   KeyWait, % A_ThisHotkey
   Send, {LButton Up}
Return

#IfWinActive
;-----END Для Dungeon Siege II</code></pre></div><p>и надо сделать что бы он перестал отрабатывать клавиши.</p><p>Я почитал, почитал и ничего не понял. <br />С обычными назначениями понятно, а тут не ясно как использовать Hotkey. </p><p>Написал массу вариантов и они все не работают.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-14T08:04:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=59246#p59246</id>
		</entry>
</feed>
