<?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=9713&amp;type=atom" />
	<updated>2015-04-26T15:34:56Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9713</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93623#p93623" />
			<content type="html"><![CDATA[<p>Подскажите пожалуйста, нет ли ошибки в этом коде, при активном режиме он потребляет от 5% до 10% процессора или это нормально? И что странно, ahk скрипт в этот момент становится активным процессом, хотя остальные все скрипты всегда фоновые. Но заметить это можно лишь когда JPEGView в фокусе, т.е. нужно Диспетчер задач установить &quot;Поверх остальных окон&quot;.</p><div class="codebox"><pre><code>#NoTrayIcon
loop
{
   WinGetActiveTitle, title
   if (title ~= &quot;- JPEGView&quot;) and (isWindowFullScreen( &quot;A&quot; ) = 0)
   {
      WinSet, Style, -0xC40000, A
      WinMove, A, , 0, 0, 1920, 1040
      WinGetTitle, Title, % MainWindowClass
      Title := RegExReplace(Title, &quot;- JPEGView&quot;)   ; текст, который будет изыматься из заголовка
      CustomColor = EEAA99 ; Может быть любого RGB цвета (ниже он будет сделан прозрачным).
      Gui, +AlwaysOnTop +LastFound +Owner ; Опция +Owner мешает появлению кнопки на панели задач.
      Gui, Color, %CustomColor%
      Gui, Font, s14
      Gui, Add, Text, vMyText cLime, %title%   ; переменная которую получили с помощью WinGetActiveTitle
      ; Делаем все пиксели этого цвета прозрачными, а сам текст - полупрозрачным (150):
      WinSet, TransColor, %CustomColor% 150
      Gui, -Caption ; Удаляем границы и заголовок окна.
      Gui, Show, x1000 y1040 NA
      loop
      {
         If !WinActive(title) or (isWindowFullScreen( &quot;A&quot; ) != 0)
         {
            Gui, Destroy
            break
         }
      }
   }
   sleep, 100
} 

isWindowFullScreen( winTitle ) {
    ;checks if the specified window is full screen
    
    winID := WinExist( winTitle )

    If ( !winID )
        Return false

    WinGet style, Style, ahk_id %WinID%
    WinGetPos ,,,winW,winH, %winTitle%
    ; 0x800000 is WS_BORDER.
    ; 0x20000000 is WS_MINIMIZE.
    ; no border and not minimized
    Return ((style &amp; 0x20800000) or winH &lt; A_ScreenHeight or winW &lt; A_ScreenWidth) ? false : true
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Esc]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32797</uri>
			</author>
			<updated>2015-04-26T15:34:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93623#p93623</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84072#p84072" />
			<content type="html"><![CDATA[<p><strong>Ядрён</strong><br />Спасибо, пригодится.</p><p><strong>Malcev</strong><br />Вообщем респект, пришла идея, но даже не думал, что можно реализовать. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-22T08:37:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84072#p84072</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84065#p84065" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Можно ли еще сделать, чтобы при клике на изображение, уже открытое окно, но в фоне, переходило на передний план или разворачивалось, если свернуто?</p></blockquote></div><p>Это вы уже сами попробуйте поковыряться.<br /></p><div class="codebox"><pre><code>loop
{
   WinGetActiveTitle, title
   if (title ~= &quot;- JPEGView&quot;) and (isWindowFullScreen( &quot;A&quot; ) = 0)
   {
      WinSet, Style, -0xC40000, A
      WinMove, A, , 0, 0, 1920, 1040
      CustomColor = EEAA99 ; Может быть любого RGB цвета (ниже он будет сделан прозрачным).
      Gui, +AlwaysOnTop +LastFound +Owner ; Опция +Owner мешает появлению кнопки на панели задач.
      Gui, Color, %CustomColor%
      Gui, Font, s14
      Gui, Add, Text, vMyText cLime, %title%   ; переменная которую получили с помощью WinGetActiveTitle
      ; Делаем все пиксели этого цвета прозрачными, а сам текст - полупрозрачным (150):
      WinSet, TransColor, %CustomColor% 150
      Gui, -Caption ; Удаляем границы и заголовок окна.
      Gui, Show, x1000 y1040 NA
      loop
      {
         If !WinActive(title) or (isWindowFullScreen( &quot;A&quot; ) != 0)
         {
            Gui, Destroy
            break
         }
      }
   }
   sleep, 100
} 

isWindowFullScreen( winTitle ) {
    ;checks if the specified window is full screen
    
    winID := WinExist( winTitle )

    If ( !winID )
        Return false

    WinGet style, Style, ahk_id %WinID%
    WinGetPos ,,,winW,winH, %winTitle%
    ; 0x800000 is WS_BORDER.
    ; 0x20000000 is WS_MINIMIZE.
    ; no border and not minimized
    Return ((style &amp; 0x20800000) or winH &lt; A_ScreenHeight or winW &lt; A_ScreenWidth) ? false : true
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-21T22:29:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84065#p84065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84060#p84060" />
			<content type="html"><![CDATA[<p>Здравствуйте , вот ещё код .</p><div class="codebox"><pre><code>#Persistent
#SingleInstance Off
DetectHiddenWindows, Off ;поиск в скрытых окнах
SetTitleMatchMode 2


mywin :=      ; название окна (можно любое приложение или окно)
interval := 100 

SetTimer, FrWin, 1000
return

#NoEnv



FrWin:
IfWinActive, %mywin%
{
WinMove, %mywin%,, 0, 0, 1280, 1024 ; параметры окна: x, y, w, h (выставляйте свое разрешение экрана)
WinSet, Style, -0xC00000, %mywin% ; убрать рамку
Sleep 300 
ExitApp
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-06-21T14:51:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84060#p84060</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84058#p84058" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Спасибо большое, это то, что нужно и даже более, например, при выходе из Fullscreen-а окно не оставалось максимизированым, а принимало размер изображения, но теперь все отлично. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Еще хотелось бы, чтобы OSD был только в оконном режиме, попробовал сам, у меня либо не работает либо все как нужно, но OSD мигает. </p><p>Можно ли еще сделать, чтобы при клике на изображение, уже открытое окно, но в фоне, переходило на передний план или разворачивалось, если свернуто?</p>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-21T12:59:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84058#p84058</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84055#p84055" />
			<content type="html"><![CDATA[<p>Попробуй так:<br /></p><div class="codebox"><pre><code>loop
{
   WinGetActiveTitle, title
   if (title ~= &quot;- JPEGView&quot;)
   {
      CustomColor = EEAA99 ; Может быть любого RGB цвета (ниже он будет сделан прозрачным).
      Gui, +AlwaysOnTop +LastFound +Owner ; Опция +Owner мешает появлению кнопки на панели задач.
      Gui, Color, %CustomColor%
      Gui, Font, s14
      Gui, Add, Text, vMyText cLime, %title%   ; переменная которую получили с помощью WinGetActiveTitle
      ; Делаем все пиксели этого цвета прозрачными, а сам текст - полупрозрачным (150):
      WinSet, TransColor, %CustomColor% 150
      Gui, -Caption ; Удаляем границы и заголовок окна.
      Gui, Show, x1000 y1040 NA
      loop
      {
         if isWindowFullScreen( &quot;A&quot; ) = 0
         {
            WinSet, Style, -0xC40000, A
            WinMove, A, , 0, 0, 1920, 1040
         }
         IfWinNotActive, % title
         {
            Gui, Destroy
            break
         }
      }
   }
   sleep, 100
} 

isWindowFullScreen( winTitle ) {
    ;checks if the specified window is full screen
    
    winID := WinExist( winTitle )

    If ( !winID )
        Return false

    WinGet style, Style, ahk_id %WinID%
    WinGetPos ,,,winW,winH, %winTitle%
    ; 0x800000 is WS_BORDER.
    ; 0x20000000 is WS_MINIMIZE.
    ; no border and not minimized
    Return ((style &amp; 0x20800000) or winH &lt; A_ScreenHeight or winW &lt; A_ScreenWidth) ? false : true
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-21T11:09:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84055#p84055</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84053#p84053" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />К сожалению, не понимаю, куда поместить код Fullscreen-а, поможете?</p><p>И еще, может можно скрипт настроить на JPEGView.exe, а не заголовок, постоянно&nbsp; срабатывает на браузер и проводник.</p><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Ну а вообще мне кажется проще написать свой &quot;супер минималистичный JPEGView&quot;, чем костыли городить.</p></blockquote></div><p>Ну костыль весьма небольшой получается ведь, у меня у foobar2000 заголовок и границы тоже скрыты, а текущая композиция выводится посредством OSD, но там UI_Hacks и OSD плагины есть, не думал что подобное возможно сделать с любой программой.</p>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-21T08:51:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84053#p84053</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84040#p84040" />
			<content type="html"><![CDATA[<p>Да, тут было:<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=72399#p72399">http://forum.script-coding.com/viewtopi … 399#p72399</a><br />Только, чем это лучше цикла в данной ситуации?<br />Все-равно придется проверять фуллскрин или нет.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-20T19:22:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84040#p84040</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84039#p84039" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong> рекомендую <strong>SHELLHOOK</strong>. И создание окна, и активацию, и смену заголовка (насколько я понял при смене картинок поможет). Циклы не нужны. Пример думаю сможешь составить, в одной из твоих тем это было.<br />Ну а вообще мне кажется проще написать свой &quot;супер минималистичный JPEGView&quot;, чем костыли городить.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-06-20T18:36:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84039#p84039</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84033#p84033" />
			<content type="html"><![CDATA[<p>Вот код с офф. форума, который определяет находится ли приложение в Fullscreen или нет<br /></p><div class="codebox"><pre><code>isFullScreen := isWindowFullScreen( &quot;A&quot; )
MsgBox % isFullScreen ? &quot;Full Screen&quot; : &quot;Windowed&quot;
Return

isWindowFullScreen( winTitle ) {
    ;checks if the specified window is full screen
    
    winID := WinExist( winTitle )

    If ( !winID )
        Return false

    WinGet style, Style, ahk_id %WinID%
    WinGetPos ,,,winW,winH, %winTitle%
    ; 0x800000 is WS_BORDER.
    ; 0x20000000 is WS_MINIMIZE.
    ; no border and not minimized
    Return ((style &amp; 0x20800000) or winH &lt; A_ScreenHeight or winW &lt; A_ScreenWidth) ? false : true
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-20T16:28:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84033#p84033</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84032#p84032" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Задача такая-же какая и была, просто нужно сделать, чтобы WinSet/WinMove применялись только при обращении к окну, а OSD заголовок при листании изображений. Плюс возможность WinSet/WinMove активировать горячей клавишей, чтобы она срабатывала при выходе из Fullscreen.</p>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-20T16:17:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84032#p84032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84031#p84031" />
			<content type="html"><![CDATA[<p>Не понимаю задачи.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-20T16:09:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84031#p84031</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84030#p84030" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Да, точно, нужно выделить это в отдельный loop, можно их делать несколько? Так не работает и в Fullscreen не заходит. </p><div class="codebox"><pre><code>#IfWinActive ahk_class #32770
F10::
window := &quot;JPEGView&quot;
SetTitleMatchMode, 2

loop
{
   IfWinActive, %window%
   {
WinSet, Style, -0xC40000, A
WinMove, A, , 0, 0, 1920, 1040
   }
} 

loop
{
   WinGetActiveTitle, title
   if (title ~= &quot;JPEGView&quot;)
   {
      CustomColor = EEAA99 ; Может быть любого RGB цвета (ниже он будет сделан прозрачным).
      Gui, +AlwaysOnTop +LastFound +Owner ; Опция +Owner мешает появлению кнопки на панели задач.
      Gui, Color, %CustomColor%
      Gui, Font, s14
      Gui, Add, Text, vMyText cLime, %title%   ; переменная которую получили с помощью WinGetActiveTitle
      ; Делаем все пиксели этого цвета прозрачными, а сам текст - полупрозрачным (150):
      WinSet, TransColor, %CustomColor% 150
      Gui, -Caption ; Удаляем границы и заголовок окна.
      Gui, Show, x1000 y1040 NA
      WinWaitNotActive, %title%
      Gui, Destroy
   }
   sleep, 100
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-20T15:12:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84030#p84030</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84029#p84029" />
			<content type="html"><![CDATA[<p>Попробуйте.<br />Из фуллскрина выходит наверное из-за:<br /></p><div class="codebox"><pre><code>      WinSet, Style, -0xC40000, A
      WinMove, A, , 0, 0, 1920, 1040</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-06-20T14:52:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84029#p84029</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоматически скрывать у вызываемого окна заголовок и границы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84028#p84028" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Отлично, теперь скрипт отрабатывает при перелистывании картинок, заголовок обновляется. Правда, теперь из Fullscreen-а выходит, но это, наверное уже не решить? </p><p>Можно было бы сделать первый клик F11 переход в Fullscreen, а после второго, с задержкой, клавиша, активирующая скрипт.</p>]]></content>
			<author>
				<name><![CDATA[Ed]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32363</uri>
			</author>
			<updated>2014-06-20T14:21:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84028#p84028</id>
		</entry>
</feed>
