<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Скрытие заголовка приложения VLC Player]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=12571</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12571&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Скрытие заголовка приложения VLC Player».]]></description>
		<lastBuildDate>Thu, 13 Apr 2017 12:01:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115042#p115042</link>
			<description><![CDATA[<div class="codebox"><pre><code>msgbox % f(&quot;a&quot;)

f(var)
{
   title := &quot;ok&quot;
   return title
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 13 Apr 2017 12:01:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115042#p115042</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115041#p115041</link>
			<description><![CDATA[<p><strong>Malcev</strong>, изначально ф-ия подразумевалась для универсальности скрипта (для работы с разными окнами). Предлагаете задавать координаты для перемещения контрола в параметрах ф-ии наряду с именем окна и контрола? Т.е. вынести найденый контрол с присвоением переменной за пределы функции невозможно?</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 13 Apr 2017 11:55:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115041#p115041</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115040#p115040</link>
			<description><![CDATA[<p>Вставьте ControlMove в функцию.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 13 Apr 2017 10:56:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115040#p115040</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115039#p115039</link>
			<description><![CDATA[<p><strong>Malcev</strong>, контрол перемещается внутри окна. Мне необходимо разместить контрол на экране аналогично размещению окна.<br />Название контрола указывал как постоянное, хотя оно меняется. А как указать найденное в функции опытным путем имя - не знаю, т.е. не знаю, как присвоить ему постоянное значение.<br /></p><div class="codebox"><pre><code>#SingleInstance Force
SetTitleMatchMode 2
CoordMode, screen
1::
   ShowControl(&quot;Ace Player&quot;, &quot;VLC MSW video&quot;)
   ControlMove, VLC MSW video 0DDE90801, 1180, 628, 870, 490
return

ShowControl(wintitle, ctrl){
   static Toggle
   win := WinExist(wintitle)
   WinGet, ActiveControlList, ControlList
   if Toggle:=!Toggle
   {
      Loop, Parse, ActiveControlList, `n
      {
         if InStr(A_LoopField, ctrl)
         {
            DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 1, &quot;UInt&quot;, 4)
            ControlGetPos, CtrlX, CtrlY, CtrlW, CtrlH, %A_LoopField%
            WinSet, Region, % CtrlX &quot;-&quot; CtrlY &quot; W&quot; CtrlW &quot; H&quot; CtrlH
 			MsgBox % A_LoopField 
         break
         }
      }
   } else {
      WinSet, Region, , % wintitle
      DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 0, &quot;UInt&quot;, 4)
      }
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 13 Apr 2017 08:50:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115039#p115039</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115038#p115038</link>
			<description><![CDATA[<p>Вы можете посмотреть, чему равна переменная A_LoopField с помощью msgbox.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 12 Apr 2017 21:43:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115038#p115038</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115037#p115037</link>
			<description><![CDATA[<p><strong>Malcev</strong>, я только понял, что скрипт получает список всех контролов, далее находит в них контрол с необходимым содержанием в имени. В качестве имени контрола я вижу там только <em>%A_LoopField%</em>, когда скрипт получает его координаты расположения в окне.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 12 Apr 2017 20:55:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115037#p115037</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115036#p115036</link>
			<description><![CDATA[<p>А вы поняли как работает скрипт из 31 поста?<br />Там этот момент учитывается.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 12 Apr 2017 20:46:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115036#p115036</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115034#p115034</link>
			<description><![CDATA[<p><strong>Malcev</strong>, а как присвоить имя найденному контролу в функции (контролу, с содержанием в имени &quot;VLC MSW video&quot;)?</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 12 Apr 2017 20:23:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115034#p115034</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115033#p115033</link>
			<description><![CDATA[<p>controlmove.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 12 Apr 2017 19:33:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115033#p115033</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=115032#p115032</link>
			<description><![CDATA[<p>Подскажите, пожалуйста, как задать нужный размер и расположение на экране выделенному контролу? В данном случае, это изображение видеоряда в плеере VLC. Окну VLC задаю нужный мне размер и расположение следующей командой:<br /></p><div class="codebox"><pre><code>WinMove, ahk_class QWidget , , 1180, 628, 870, 490
</code></pre></div><p>Но необходио, чтобы данному размеру и расположению соответствовала именно область изображения плеера, которая осталась в результате:<br /></p><div class="codebox"><pre><code>
ShowControl(&quot;Ace Player&quot;, &quot;VLC MSW video&quot;)

ShowControl(wintitle, ctrl){
   static Toggle
   win := WinExist(wintitle)
   WinGet, ActiveControlList, ControlList
   if Toggle:=!Toggle
   {
      Loop, Parse, ActiveControlList, `n
      {
         if InStr(A_LoopField, ctrl)
         {
            DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 1, &quot;UInt&quot;, 4)
            ControlGetPos, CtrlX, CtrlY, CtrlW, CtrlH, %A_LoopField%
            WinSet, Region, % CtrlX &quot;-&quot; CtrlY &quot; W&quot; CtrlW &quot; H&quot; CtrlH
            break
         }
      }
   } else {
      WinSet, Region, , % wintitle
      DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 0, &quot;UInt&quot;, 4)
      }
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 12 Apr 2017 17:49:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=115032#p115032</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=114382#p114382</link>
			<description><![CDATA[<p>У вас в коде при каждом обращении к функции проверяется if Toggle:=!Toggle.<br />То есть, если мы не будем сохранять текущее значение toggle, то результат всегда будет 1.<br /></p><div class="codebox"><pre><code>toggle := &quot;&quot;
Toggle:=!Toggle
msgbox % Toggle</code></pre></div><p>Переменная же win высчитывается только в первом случае, хотя используется в обоих:</p><div class="codebox"><pre><code>DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 0, &quot;UInt&quot;, 4)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 29 Mar 2017 20:13:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=114382#p114382</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=114378#p114378</link>
			<description><![CDATA[<p><strong>Malcev</strong>, спасибо, работает! А по какому признаку в данном примере становится ясно, что переменные необходимо объявить статическими? Иными словами, как понять необходимость сохранения их значений между вызовами?</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 29 Mar 2017 19:30:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=114378#p114378</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=114371#p114371</link>
			<description><![CDATA[<p>Объявите переменные toggle и win как статические.<br /></p><div class="quotebox"><blockquote><p>Статические переменные: чтобы сохранить значение переменной между вызовами, ее можно объявить статической</p></blockquote></div><p><a href="http://www.script-coding.com/AutoHotkey/Functions.html">http://www.script-coding.com/AutoHotkey/Functions.html</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 29 Mar 2017 13:25:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=114371#p114371</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=114362#p114362</link>
			<description><![CDATA[<p><strong>Malcev</strong>, спасибо! Установил переключение одной клавишей, но возврат окна в исходное положение не работает после попытки заключить сценарий в функцию. Укажите на ошибку, пожалуйста.<br /></p><div class="codebox"><pre><code>
f1::
ShowControl(&quot;Ace Player&quot;, &quot;VLC MSW video&quot;)
return

ShowControl(wintitle, ctrl)
{
SetTitleMatchMode 2
if Toggle:=!Toggle
{
   win := WinExist(wintitle)
   WinGet, ActiveControlList, ControlList
   Loop, Parse, ActiveControlList, `n
   {
      if InStr(A_LoopField, ctrl)
      {
         DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 1, &quot;UInt&quot;, 4)
         ControlGetPos, CtrlX, CtrlY, CtrlW, CtrlH, %A_LoopField%
         WinSet, Region, % CtrlX &quot;-&quot; CtrlY &quot; W&quot; CtrlW &quot; H&quot; CtrlH
         break
      }
}
} else {
   WinSet, Region, , % wintitle
   DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 0, &quot;UInt&quot;, 4)
}
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Wed, 29 Mar 2017 09:09:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=114362#p114362</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие заголовка приложения VLC Player]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=114359#p114359</link>
			<description><![CDATA[<p>Надо еще окну вернуть первоначальное его отображение:<br /></p><div class="codebox"><pre><code>DllCall(&quot;dwmapi\DwmSetWindowAttribute&quot;, &quot;Ptr&quot;, win, &quot;UInt&quot;, 2, &quot;Int*&quot;, 0, &quot;UInt&quot;, 4)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 28 Mar 2017 23:02:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=114359#p114359</guid>
		</item>
	</channel>
</rss>
