<?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=11019</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11019&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: игнорирование условия IfWinActive, срабатывание везде».]]></description>
		<lastBuildDate>Wed, 21 Oct 2015 03:49:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98054#p98054</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Верю, но не в данном случае; список подпунктов данного меню генеририруется как-то хитро, после запуска программы, и боюсь, недоступен для данного метода.</p></blockquote></div><p>Раз работает с шорткатами, значит должно работать и с winmenuselectitem даже если название меняется. (в названии меню будет стоять &amp;перед горячей клавишей, следовательно можно парсить.)<br />Вот код от Teadrinker для определения всех подпунктов меню:<br /><a href="http://forum.script-coding.com/viewtopic.php?id=10980&amp;p=2">http://forum.script-coding.com/viewtopi … 80&amp;p=2</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:49:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98054#p98054</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98053#p98053</link>
			<description><![CDATA[<p>Вопрос закрыт, кажется, я сам дурак (полагаю, это почти всегда ответ):<br /></p><div class="codebox"><pre><code>#IfWinActive, ahk_class illustrator
#vk5A:: ;z zoom to selection
SendMessage, 0x50, , 0x4090409, , ahk_class illustrator
send {alt down}{f}{alt up}
send {r}{v}{3}
return
#IfWinActive</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (chegr)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:39:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98053#p98053</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98052#p98052</link>
			<description><![CDATA[<p>Хотки надо вставлять внутрь директивы:<br /></p><div class="codebox"><pre><code>#IfWinActive, ahk_class illustrator
#vk5A::
SendMessage, 0x50, , 0x4090409, , ahk_class illustrator
send {alt down}{f}{alt up}
send {r}{v}{3}
return
#IfWinActive</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:37:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98052#p98052</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98051#p98051</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Для выбора меню лучше использовать WinMenuSelectItem.</p></blockquote></div><p>Верю, но не в данном случае; список подпунктов данного меню генеририруется как-то хитро, после запуска программы, и боюсь, недоступен для данного метода. А вот по клавишам — работает (и имена подпунктов настроены именно под клавиатуру).<br />Суть вопроса в другом — почему код срабатывает везде, а не только в целевом окне?</p>]]></description>
			<author><![CDATA[null@example.com (chegr)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:36:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98051#p98051</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98050#p98050</link>
			<description><![CDATA[<p>Использование закрывающей директивы не помогло <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>#vk5A::
#IfWinActive, ahk_class illustrator
SendMessage, 0x50, , 0x4090409, , ahk_class illustrator
send {alt down}{f}{alt up}
send {r}{v}{3}
return
#IfWinActive</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (chegr)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:33:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98050#p98050</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98049#p98049</link>
			<description><![CDATA[<p><a href="http://www.script-coding.com/AutoHotkey/IfWinActive.html">http://www.script-coding.com/AutoHotkey … ctive.html</a><br />Для выбора меню лучше использовать, WinMenuSelectItem.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 21 Oct 2015 03:29:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98049#p98049</guid>
		</item>
		<item>
			<title><![CDATA[AHK: игнорирование условия IfWinActive, срабатывание везде]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98048#p98048</link>
			<description><![CDATA[<p>У меня есть один общий скрипт, в котором сведена все необходимая мне функциональность.<br />Часть из них нужна для работы в одной программе, часть — в другой, третья — вообще везде.<br />Но я заметил, что несмотря на выставленное условие, код выполняется везде:<br /></p><div class="codebox"><pre><code>#NoEnv
#Persistent
#SingleInstance force
SetKeyDelay, -1

;other stuff

#vk5A::
IfWinActive, ahk_class illustrator
SendMessage, 0x50, , 0x4090409, , ahk_class illustrator
send {alt down}{f}{alt up}
send {r}{v}{3}
return</code></pre></div><p>Этот фрагмент кода разворачивает нажатие Win+A в последовательность нажатий, чтобы добраться до нужного пункта меню в Adobe Illustrator, на который нельзя повесить горячую клавишу штатными средствами. То есть в данном виде он работает, но зачем-то срабатывает так же в других программах.<br />Что я делаю не так?</p>]]></description>
			<author><![CDATA[null@example.com (chegr)]]></author>
			<pubDate>Wed, 21 Oct 2015 02:54:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98048#p98048</guid>
		</item>
	</channel>
</rss>
