<?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=11044</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11044&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Задание работы скрипта во встраиваемом окне программы».]]></description>
		<lastBuildDate>Wed, 09 Nov 2016 14:02:35 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=109025#p109025</link>
			<description><![CDATA[<div class="quotebox"><cite>becauseim пишет:</cite><blockquote><p>правильно ли я сделал</p></blockquote></div><p>Функция timeline() выглядит странно. Почему yCtrl не должно быть равно именно 80? А переменная StateEditing вообще не задана. Как она может быть равна 520?</p><p>Чтобы подсказать, как правильно, нужно Premiere Pro иметь.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 09 Nov 2016 14:02:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=109025#p109025</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=109023#p109023</link>
			<description><![CDATA[<p>Необходимо задать работу горячей клавиши в определенном контроле. Сейчас не работает клавиша <strong>m</strong>, но работает <strong>g</strong>. Подскажите, пожалуйста, в чем ошибка?<br /></p><div class="codebox"><pre><code>timeline()
{
	Global
	IfWinActive ahk_class Premiere Pro
	{
		MouseGetPos,,,, Ctrl, 2
		ControlGetPos, xCtrl, yCtrl,,,, ahk_id %ctrl%
		if ((yCtrl != 80) and (StateEditing = 520))
			{
				return !ErrorLevel
			}
	}
}

#UseHook
Array := [&quot;^+{f2}&quot;, &quot;^+{f7}&quot;, &quot;^+{f5}&quot;, &quot;^+{f6}&quot;, &quot;^+{f1}&quot;], max := Array.MaxIndex()
Return

#If processing
*sc32:: Return
#If

#if timeline()
sc32::   ; m
   KeyWait, % A_ThisHotkey, T0.3
   if !ErrorLevel
      SendInput, {%A_ThisHotkey%}
   else  {
      while GetKeyState(A_ThisHotkey, &quot;P&quot;) &amp;&amp; processing := 1  {
         SendInput, % Array[(k := mod(A_Index, max)) ? k : max]
         Sleep, 500
      }
      processing := &quot;&quot;
   }
   Return

g:: ToolTip g
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 09 Nov 2016 12:08:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=109023#p109023</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98609#p98609</link>
			<description><![CDATA[<p>Не знаю, правильно ли я сделал, но не работает.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#SingleInstance Force

ArrVegas:=	{&quot;F2&quot;:{&quot;Label&quot;:&quot;F2&quot;, &quot;Delay&quot;:250}}
		
Hotkey, IfWinActive, ahk_class Vegas.Class.Frame
		
For key in ArrVegas  {
	Hotkey, %key%, Work
	ArrVegas[key][&quot;C&quot;] := 0
}
Return

Work:
	o := ArrVegas[A_ThisHotkey], o[&quot;C&quot;] := A_TickCount - o[&quot;T&quot;] &lt; o[&quot;Delay&quot;] ? o[&quot;C&quot;] + 1 : 1 
	o[&quot;T&quot;] := A_TickCount, IsLabel(o[&quot;Label&quot;] &quot;_&quot; o[&quot;C&quot;]) ? 0 : (o[&quot;C&quot;] := 1) 
	Try Gosub, % o[&quot;Label&quot;] &quot;_&quot; o[&quot;C&quot;]
	Return

F2_1:
	SendInput ^!+k
	Return
			
F2_2:
	SendInput !0+^[
	Return
	
	


#if timeline()
vk44:: SendInput {Delete}
#if

timeline()
{
   IfWinActive ahk_class Vegas.Class.Frame
   {
      ControlGetFocus, control, ahk_class Vegas.Class.Frame
      If Instr(control, &quot;Vegas.Class.Doc&quot;)
         return !ErrorLevel
   }
}

</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Sat, 31 Oct 2015 18:26:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98609#p98609</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98608#p98608</link>
			<description><![CDATA[<p>Уже ж написал выше.<br /></p><div class="codebox"><pre><code>Hotkey,IfWinActive,ahk_class Vegas.Class.Frame</code></pre></div><p>Или в 13ой версии окно не меняет названия, при открытии проекта?</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sat, 31 Oct 2015 18:04:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98608#p98608</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98607#p98607</link>
			<description><![CDATA[<p><strong>Alectric</strong>, не подскажете, как все-таки объединить сценарии в один файл? Чтобы горячая клавиша F2 также была активной.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Sat, 31 Oct 2015 18:00:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98607#p98607</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98606#p98606</link>
			<description><![CDATA[<p>Видимо в 12ой версии по другому...</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sat, 31 Oct 2015 17:58:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98606#p98606</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98605#p98605</link>
			<description><![CDATA[<p><strong>Alectric</strong>, не совсем Вас понял. Первый скрипт должен работать в в окне программы. Второй же работает только в области таймлана, чего удалось добиться благодаря методу от <strong>Malcev</strong>. Оба сценария работают необходимым образом, но только из разных файлов. Располагаясь в одном файле, горячая клавиша из первого сценария уже не активна.</p><p>upd.: Не равносилен, т.к. срабатывает всюду, а не в заданной области.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Sat, 31 Oct 2015 17:46:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98605#p98605</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98604#p98604</link>
			<description><![CDATA[<div class="codebox"><pre><code>Hotkey, IfWinActive, Vegas Pro 13.0
</code></pre></div><p>Название окна разве не меняется при открытии проекта?<br /></p><div class="codebox"><pre><code>Hotkey,IfWinActive,ahk_class Vegas.Class.Frame</code></pre></div><p>...</p><p>На мой взгляд код:<br /></p><div class="codebox"><pre><code>#if timeline()
vk44:: tooltip,Delete
#if

timeline()
{
   IfWinActive ahk_class Vegas.Class.Frame
   {
      ControlGetFocus, control, ahk_class Vegas.Class.Frame
      If Instr(control, &quot;Vegas.Class.Doc&quot;)
         return !ErrorLevel
   }
}
</code></pre></div><p>равносилен:<br /></p><div class="codebox"><pre><code>#IfWinActive ahk_class Vegas.Class.Frame
vk44:: tooltip,Delete
#if
</code></pre></div><p>,т.к. клавиша срабатывает по всей площади окна.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sat, 31 Oct 2015 17:43:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98604#p98604</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98601#p98601</link>
			<description><![CDATA[<p>Не получается объединить два скрипта в одном файле. А именно, не работает первый сценарий, который должен работать в окне программы целиком. Как правильно их объединить?<br /></p><div class="codebox"><pre><code>

ArrVegas:=	{&quot;F2&quot;:{&quot;Label&quot;:&quot;F2&quot;, &quot;Delay&quot;:250}}
		
Hotkey, IfWinActive, Vegas Pro 13.0
		
For key in ArrVegas  {
	Hotkey, %key%, Work
	ArrVegas[key][&quot;C&quot;] := 0
}
Return

Work:
	o := ArrVegas[A_ThisHotkey], o[&quot;C&quot;] := A_TickCount - o[&quot;T&quot;] &lt; o[&quot;Delay&quot;] ? o[&quot;C&quot;] + 1 : 1 
	o[&quot;T&quot;] := A_TickCount, IsLabel(o[&quot;Label&quot;] &quot;_&quot; o[&quot;C&quot;]) ? 0 : (o[&quot;C&quot;] := 1) 
	Try Gosub, % o[&quot;Label&quot;] &quot;_&quot; o[&quot;C&quot;]
	Return

F2_1:
	SendInput ^!+k
	Return
			
F2_2:
	SendInput !0+^[
	Return
</code></pre></div><div class="codebox"><pre><code>#if timeline()
vk44:: SendInput {Delete}
#if

timeline()
{
   IfWinActive ahk_class Vegas.Class.Frame
   {
      ControlGetFocus, control, ahk_class Vegas.Class.Frame
      If Instr(control, &quot;Vegas.Class.Doc&quot;)
         return !ErrorLevel
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Sat, 31 Oct 2015 17:08:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98601#p98601</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98573#p98573</link>
			<description><![CDATA[<div class="codebox"><pre><code>#if timeline()
1:: msgbox timeline
#if

timeline()
{
   IfWinActive ahk_class Vegas.Class.Frame
   {
      ControlGetFocus, control, ahk_class Vegas.Class.Frame
      If Instr(control, &quot;Vegas.Class.Doc&quot;)
         return !ErrorLevel
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 18:27:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98573#p98573</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98572#p98572</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>У меня в 13 вегасе контрол таймлайна - vegas.class.doc10.</p></blockquote></div><p>Если переместить или добавить &quot;под-окно&quot;, то число в конце меняется. У меня к примеру doc5 - doc4 (если закрыть 1 &quot;под-окно&quot;).</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 18:21:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98572#p98572</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98570#p98570</link>
			<description><![CDATA[<div class="codebox"><pre><code>#if timeline()
1:: msgbox timeline
#if

timeline()
{
   IfWinActive ahk_class Vegas.Class.Frame
   {
      ControlGetFocus, control, ahk_class Vegas.Class.Frame
      If (control=&quot;Vegas.Class.Doc10&quot;)
         return !ErrorLevel
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 18:06:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98570#p98570</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98568#p98568</link>
			<description><![CDATA[<p>В общем, вариант от <strong>Alectric</strong> работает, но в качестве сокращений его использовать вряд ли получится. Скорость отзывчивости слишком мала.<br />Уважаемый <strong>Malcev</strong> однажды подсказал о таком методе работы с таймлайном в Premiere Pro:<br /></p><div class="codebox"><pre><code>#if timeline()
WheelUp:: Send {=}
WheelDown:: Send {-}
#if

timeline()
{
   IfWinActive ahk_class Premiere Pro
   {
      MouseGetPos, , , id, control    ; узнаем над каким контролом находится мышка
      n := RegExReplace(control, &quot;\D&quot;)   ;  присваиваем переменной номер контрола
      If (n&gt;=19) and (n&lt;=50)   ; n находим опытным путем
         return !ErrorLevel
   }
}</code></pre></div><p>Возможно, есть вероятность интерпретации данного метода?</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Fri, 30 Oct 2015 17:53:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98568#p98568</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98567#p98567</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Иногда с большой иногда нет, это минус использования Acc, но других способов я не вижу... пока-что. Т.к. контролы все время меняются и как отдельные окна эти &quot;подокна&quot; не определяются, пока их не отделишь...</p></blockquote></div><p>У меня в 13 вегасе контрол таймлайна - vegas.class.doc10.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 17:45:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98567#p98567</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Задание работы скрипта во встраиваемом окне программы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98566#p98566</link>
			<description><![CDATA[<div class="quotebox"><cite>yalanne пишет:</cite><blockquote><p> try</p></blockquote></div><p>Пока еще не разбирался с &quot;попыткой&quot;, но кажется там &quot;ловить&quot; (catch) нужно обязательно или нет? Да и не понял пока - как это действует &quot;внутри&quot; (всмысле - делает эту ошибку не критической для системы или просто ловит сообщение об ошибке и не выводит на экран, в плане безопасности таких ошибок...).</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 17:22:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98566#p98566</guid>
		</item>
	</channel>
</rss>
