<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Как сделать Overlay.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14008&amp;type=atom" />
	<updated>2018-08-08T08:25:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14008</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127748#p127748" />
			<content type="html"><![CDATA[<p>Спасибо большое все работает.</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-08T08:25:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127748#p127748</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127747#p127747" />
			<content type="html"><![CDATA[<p>Добавьте ~ перед вашей клавишей </p><div class="codebox"><pre><code>~F11::</code></pre></div><p> детальней <a href="https://autohotkey.com/docs/Hotkeys.htm#Symbols">тут</a>.<br />Но надо тогда будет добавить в таймерах в опциях Gui, timer: Show функцию NoActivate</p>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2018-08-08T07:59:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127747#p127747</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127746#p127746" />
			<content type="html"><![CDATA[<p>Все хорошо работает, но есть проблема мне нужны те кнопки которые я забиндил на таймер, я не могу печатать.<br />Игнорирует нажатие кнопки. <br />Как это исправить ?</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-08T06:05:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127746#p127746</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127745#p127745" />
			<content type="html"><![CDATA[<p><strong>DaGer</strong><br />Все прекрасно работает, просто надо правильно его вставить в код.</p><div class="codebox"><pre><code>#SingleInstance Force
#persistent
#NoEnv
		Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x20
		Gui, Add, Picture, w60 h60 x0 y0,  C:\Users\Administrator\Desktop\Script\$.png
        Gui, Show, w60 h60 x100 y100, NoActivate
		WinSet Transparent, 244
		return
		y::
		Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x20
		Gui, Font, S30 CDefault, Verdana
		Gui, Add, Text, x2 y1 w90 h90 vtext6,
		Gui, Show, w60 h60 x90 y90, NoActivate
		WinSet Transparent, 200
		Loop, 15
	{
		GuiControl, Text, text6, % 15-A_index 
		Sleep, 1000
	}
Reload
Return


F12::
ListLines Off
SetBatchLines -1
Gui,timer: +HWNDhMain -DPIScale
Gui,timer: -Caption +AlwaysOnTop +ToolWindow
Gui,timer: Color, EEEEEE
Gui,timer: +Lastfound 
WinSet, TransColor, EEEEEE

TestTimer := New ClockGui(hMain, &quot;Pos xs y+10|sek|Name TestTimer|w 250|h 120|db 14|bckgitem EEEEEE|coloritem 010101|Font s80|Colon Flash 300&quot;) ; параметр &quot;sek&quot; отвечает за 
                            ; отображение только секунд. Для добавления минут надо заменить его на &quot;min&quot; а для добавления часов надо заменить его на &quot;Sec&quot;
TestTimer.SetTime(&quot;00:00:10&quot;)			; ставим время таймера
TestTimer.StartTimer(&quot;EndTimer&quot;)
TestTimer.Show()
Gui, timer: Show, x100 y100  ; координаты появления самого таймера
EndTimer(This){
Gui, timer:destroy     ; выполняем по завершении таймера
}
</code></pre></div><p>Если надо несколько таких окон с таймером то в предыдущем коде меняем строки</p><div class="codebox"><pre><code>TestTimer.StartTimer(&quot;EndTimer&quot;)
...
EndTimer(This){</code></pre></div><p>на <br /></p><div class="codebox"><pre><code>TestTimer.StartTimer(&quot;EndTimer1&quot;)
...
EndTimer1(This){</code></pre></div><p>и делаем новое окно</p><div class="codebox"><pre><code>F11::
ListLines Off
SetBatchLines -1
Gui,timer2: +HWNDhMain -DPIScale
Gui,timer2: -Caption +AlwaysOnTop +ToolWindow
Gui,timer2: Color, EEEEEE
Gui,timer2: +Lastfound 
WinSet, TransColor, EEEEEE

TestTimer := New ClockGui(hMain, &quot;Pos xs y+10|sek|Name TestTimer|w 250|h 120|db 14|bckgitem EEEEEE|coloritem 010101|Font s80|Colon Flash 300&quot;) ; параметр &quot;sek&quot; отвечает за 
                            ; отображение только секунд. Для добавления минут надо заменить его на &quot;min&quot; а для добавления часов надо заменить его на &quot;Sec&quot;
TestTimer.SetTime(&quot;00:00:10&quot;)			; ставим время таймера
TestTimer.StartTimer(&quot;EndTimer2&quot;)
TestTimer.Show()
Gui, timer2: Show, x100 y100  ; координаты появления самого таймера
EndTimer2(This){
Gui, timer2:destroy     ; выполняем по завершении таймера
}</code></pre></div><div class="quotebox"><blockquote><p>При отсчете с 2вухзначных чисел на однозначное число смещяется в лево , Как сделать чтобы однозначное число было тоже по центру?</p></blockquote></div><p>У себя не замечал такого, не знаю почему у вас так происходит, у меня ничего не смещается.<br /></p><div class="quotebox"><blockquote><p>Можно как нибуть убирать таймер когда он до считает до 0 без команды reload и можно будет использовать таймер еще раз¿<br />И как сделать чтобы таймер не выключал изображение, а то при нажатии на кнопку изображение пропадает и начинает отсчет, надо чтобы таймер цифры по верх изобр. Были¿</p></blockquote></div><p>Таймер сам себя выключает когда досчитывает до 0 этим <br /></p><div class="codebox"><pre><code>EndTimer(This){
Gui, destroy     ; выполняем по завершении таймера
}</code></pre></div><p>И его можно опять использовать по той же клавише. И выключать картинку он не будет так как будет рисоваться в новом окне.</p><p>И настоятельно рекомендую к прочтению <a href="https://autohotkey.com/docs/commands/Gui.htm#Add">эту статью</a>. Сразу отсеется много вопросов.</p>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2018-08-07T18:59:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127745#p127745</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127743#p127743" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
#persistent
#NoEnv
		Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x20
		Gui, Add, Picture, w60 h60 x0 y0, C:\Users\Administrator\Desktop\Script\$.png
        Gui, Show, w60 h60 x100 y100, NoActivate
		WinSet Transparent, 244
		return
		y::
		Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x20
		Gui, Font, S30 CDefault, Verdana
		Gui, Add, Text, x2 y1 w90 h90 vtext6,
		Gui, Show, w60 h60 x90 y90, NoActivate
		WinSet Transparent, 200
		Loop, 15
	{
		GuiControl, Text, text6, % 15-A_index 
		Sleep, 1000
	}
Reload
Return
</code></pre></div><p>То что нужно но возникло куча вопросов.<br /> Как сделать несколько таких окон ?<br />При отсчете с 2вухзначных чисел на однозначное число смещяется в лево , Как сделать чтобы однозначное число было тоже по центру?<br />Можно как нибуть убирать таймер когда он до считает до 0 без команды reload и можно будет использовать таймер еще раз¿<br />И как сделать чтобы таймер не выключал изображение, а то при нажатии на кнопку изображение пропадает и начинает отсчет, надо чтобы таймер цифры по верх изобр. Были¿</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-07T17:48:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127743#p127743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127740#p127740" />
			<content type="html"><![CDATA[<p>Вспомнил про что был еще <a href="http://forum.script-coding.com/viewtopic.php?pid=118563#p118563">такой</a> вариант часов, таймера, секундомера.</p><div class="codebox"><pre><code>
#SingleInstance Force
#Persistent
#NoEnv
F12::
ListLines Off
SetBatchLines -1
Gui, +HWNDhMain -DPIScale
Gui, -Caption +AlwaysOnTop +ToolWindow
Gui, Color, EEEEEE
Gui, +Lastfound 
WinSet, TransColor, EEEEEE

TestTimer := New ClockGui(hMain, &quot;Pos xs y+10|sek|Name TestTimer|w 250|h 120|db 14|bckgitem EEEEEE|coloritem 010101|Font s80|Colon Flash 300&quot;) ; параметр &quot;sek&quot; отвечает за 
                            ; отображение только секунд. Для добавления минут надо заменить его на &quot;min&quot; а для добавления часов надо заменить его на &quot;Sec&quot;
TestTimer.SetTime(&quot;00:00:10&quot;)			; ставим время таймера
TestTimer.StartTimer(&quot;EndTimer&quot;)
TestTimer.Show()
Gui, Show, x100 y100  ; координаты появления самого таймера
EndTimer(This){
Gui,destroy     ; выполняем по завершении таймера
}
</code></pre></div><p>Ну и для работы самого таймера надо &quot;Class ClockGui&quot; но чутка модифицированый мною (простите меня <strong>serzh82saratov</strong> за мою криворукость в вашем коде) для отображения отдельно секунд и отдельно секунд с минутами, если вам надо будет таймер больше чем на 59 секунд. Можете его закинуть в самый конец вашего кода чтобы он не путался под руками.<br /></p><div class="codebox"><pre><code>Class ClockGui {
	;  Автор - serzh82saratov
	;  Описание - http://forum.script-coding.com/viewtopic.php?id=12931
	
	Static WM_LBUTTONDOWN := 0x201, WM_LBUTTONDBLCLK := 0x203, WM_RBUTTONDOWN := 0x204
	, WM_RBUTTONDBLCLK := 0x206, WM_MOUSEWHEEL := 0x020A, WM_MBUTTONDOWN := 0x0207, Mem := {}

	__New(hParent, Option) {
		Local Font, FontName, Width, Height, Sec, Sek, Min, Name, DB, DS, hH1, hH2, hM1, hM2, hS1, hS2, hF1, hF2, W, FlashTime, Flash
		, Colon, Colon_O, S_DefaultGui, S_FormatInteger, RealWidth, hWnd, ColorItem, BckgItem, BckgMain, Off, k, v, rm, rm1
		This.Initialize()
		S_FormatInteger := A_FormatInteger
		SetFormat, IntegerFast, D
		Option := &quot;|&quot; Option &quot;|&quot;
		Width := This.Option(&quot;W&quot;, Option, 0)
		Height := This.Option(&quot;H&quot;, Option, 0)
		DS := This.Option(&quot;DS&quot;, Option, 0)
		DB := This.Option(&quot;DB&quot;, Option, 0)
		BckgMain := This.Option(&quot;BckgMain&quot;, Option, &quot;Default&quot;)
		BckgItem := This.Option(&quot;BckgItem&quot;, Option, &quot;000000&quot;)
		ColorItem := This.Option(&quot;ColorItem&quot;, Option, &quot;ffffff&quot;)
		Name := This.Option(&quot;Name&quot;, Option)
		Font := This.Option(&quot;Font&quot;, Option)
		FontName := This.Option(&quot;FontName&quot;, Option)
		Sec := !!RegExMatch(Option, &quot;i)\|\s*Sec\s*\|&quot;)
        Sek := !!RegExMatch(Option, &quot;i)\|\s*Sek\s*\|&quot;)
        Min := !!RegExMatch(Option, &quot;i)\|\s*Min\s*\|&quot;)
		Colon := !!RegExMatch(Option, &quot;i)\|\s*Colon\s*\|&quot;)
		Pos := This.Option(&quot;Pos&quot;, Option)
		Section := Instr(Option, &quot;|Section|&quot;) ? &quot;Section&quot; : &quot;&quot; 
		
		If (Colon_O := this.Option(&quot;Colon&quot;, Option)) &amp;&amp; (Colon := 1)
		{
			InStr(Colon_O, &quot;Flash&quot;) &amp;&amp; (Flash := 1) &amp;&amp; !RegExMatch(Colon_O, &quot;\s+\d+&quot;, FlashTime) &amp;&amp; (FlashTime := 500)
			FlashTime := FlashTime &gt; 950 ? 950 : FlashTime &lt; 50 ? 50 : FlashTime 
		} 
		W := (Width - (DS * (Sec ? 3 : 2) + DB * (Sec ? 2 : 1))) / (Sec ? 6 : 4)
		
		S_DefaultGui := A_DefaultGui
		Gui, New
		Gui, +HWNDhWnd -DPIScale -Caption +0x40000000 -0x80000000  ; Add WS_CHILD, remove WS_POPUP, setparent no deactivate main gui
		Gui, Color, %BckgItem%
		Gui, Margin, 0, 0
		Gui, Font, %Font%, %FontName%


        if Sek
    {
			If Colon
			{
				Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
				Gui, Add, Text, % &quot;+0x201 x+0 yp-&quot; Off &quot; hp+&quot; Off &quot; w&quot; (DB - DS * 2) &quot; c&quot; ColorItem &quot; HwndhF2&quot;, :
				Gui, Add, Progress, x+0 y0 h%Height% w%DS% Background%BckgMain%
			}
			Else
				Gui, Add, Progress, x+0 yp hp w%DB% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS1
			Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS2
    }
    Else
    {
    if Min
    {
    		If Colon
		{
			Off := (RegExMatch(Colon_O, &quot;i)v(\d+)&quot;, rm) ? rm1 : Height / 6)
			Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
			Gui, Add, Text, % &quot;+0x201 x+0 yp-&quot; Off &quot; hp+&quot; Off &quot; w&quot; (DB - DS * 2) &quot; c&quot; ColorItem &quot; HwndhF1&quot;, :
			Gui, Add, Progress, x+0 y0 h%Height% w%DS% Background%BckgMain%
		}
		Else
			Gui, Add, Progress, x+0 yp hp w%DB% Background%BckgMain%

    	Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhM1
		Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
		Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhM2
			If Colon
			{
				Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
				Gui, Add, Text, % &quot;+0x201 x+0 yp-&quot; Off &quot; hp+&quot; Off &quot; w&quot; (DB - DS * 2) &quot; c&quot; ColorItem &quot; HwndhF2&quot;, :
				Gui, Add, Progress, x+0 y0 h%Height% w%DS% Background%BckgMain%
			}
			Else
				Gui, Add, Progress, x+0 yp hp w%DB% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS1
			Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS2
     }
     Else
     {    
		Gui, Add, Text, x0 y0 w%W% h%Height% +0x201 +0x100 c%ColorItem% HwndhH1
		Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
		Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhH2

		If Colon
		{
			Off := (RegExMatch(Colon_O, &quot;i)v(\d+)&quot;, rm) ? rm1 : Height / 6)
			Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
			Gui, Add, Text, % &quot;+0x201 x+0 yp-&quot; Off &quot; hp+&quot; Off &quot; w&quot; (DB - DS * 2) &quot; c&quot; ColorItem &quot; HwndhF1&quot;, :
			Gui, Add, Progress, x+0 y0 h%Height% w%DS% Background%BckgMain%
		}
		Else
			Gui, Add, Progress, x+0 yp hp w%DB% Background%BckgMain%

		Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhM1
		Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
		Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhM2
		If Sec
		{
			If Colon
			{
				Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
				Gui, Add, Text, % &quot;+0x201 x+0 yp-&quot; Off &quot; hp+&quot; Off &quot; w&quot; (DB - DS * 2) &quot; c&quot; ColorItem &quot; HwndhF2&quot;, :
				Gui, Add, Progress, x+0 y0 h%Height% w%DS% Background%BckgMain%
			}
			Else
				Gui, Add, Progress, x+0 yp hp w%DB% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS1
			Gui, Add, Progress, x+0 yp hp w%DS% Background%BckgMain%
			Gui, Add, Text, x+0 y0 w%W% hp +0x201 +0x100 c%ColorItem% HwndhS2
		}
    }
    }
		
		Gui, +Parent%hParent%
		Gui, %hParent%:Add, Text, Hidden HWNDhDummy %Pos% w0 h0
		GuiControlGet, MyPos, Pos, %hDummy% 
		DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hDummy) 
		Gui, Show, Hide AutoSize x%MyPosX% y%MyPosY% 
		Gui, %S_DefaultGui%:Default 
		WinGetPos, , , RealWidth, RealHeight, ahk_id %hWnd%
		Gui, %hParent%:Add, Text, Hidden HWNDhDummy x%MyPosX% y%MyPosY% w%RealWidth% h%RealHeight% %Section%
		DllCall(&quot;DestroyWindow&quot;, &quot;Ptr&quot;, hDummy)

		For, k, v in [&quot;hWnd&quot;,&quot;Name&quot;,&quot;Sec&quot;,&quot;Sek&quot;,&quot;RealWidth&quot;,&quot;RealHeight&quot;,&quot;FlashTime&quot;,&quot;hParent&quot;,&quot;Pos&quot;
		,&quot;Height&quot;,&quot;Flash&quot;,&quot;hH1&quot;,&quot;hH2&quot;,&quot;hM1&quot;,&quot;hM2&quot;,&quot;hS1&quot;,&quot;hS2&quot;,&quot;hF1&quot;,&quot;hF2&quot;]
			This[v] := %v%
		For k, v in [&quot;H1&quot;,&quot;H2&quot;,&quot;M1&quot;,&quot;M2&quot;,&quot;S1&quot;,&quot;S2&quot;]
			This.Mem.Ctrl[h%v%] := {Gui:hWnd, Name:v}
		This.Mem.Gui[hWnd] := This, This.Stop(1)
		SetFormat, IntegerFast, %S_FormatInteger%
	}
	Initialize() {
		Static Start
		Local Class
		If Start
			Return
		Class := This.__Class, Class := %Class%, Start := 1
		OnMessage(Class.WM_LBUTTONDOWN, ObjBindMethod(Class, &quot;OnButtonDown&quot;))
		OnMessage(Class.WM_LBUTTONDBLCLK, ObjBindMethod(Class, &quot;OnButtonDown&quot;))
		OnMessage(Class.WM_RBUTTONDOWN, ObjBindMethod(Class, &quot;OnButtonDown&quot;))
		OnMessage(Class.WM_RBUTTONDBLCLK, ObjBindMethod(Class, &quot;OnButtonDown&quot;))
		OnMessage(Class.WM_MOUSEWHEEL, ObjBindMethod(Class, &quot;OnMouseWheel&quot;))
		OnMessage(Class.WM_MBUTTONDOWN, ObjBindMethod(Class, &quot;OnMbuttonDown&quot;))
	}
	Show(Show=1) { 
		Gui, % This.hWnd &quot;:&quot; (Show ? &quot;Show&quot; : &quot;Hide&quot;), % (Show ? &quot;NA&quot; : &quot;&quot;)
	} 
	Move(x, y) {
		x := Format(&quot;{:d}&quot;, x), y := Format(&quot;{:d}&quot;, y)
		Gui, % This.hWnd &quot;:Show&quot;, NA x%x% y%y% 
	}
	Stop(Param = &quot;&quot;) {
		If Param =
			Return This._Stop
		This._Stop := Param
		If !Param
			This.Block(1)
		If Param &amp;&amp; This.InDay
			This.InDay := 0
		If Param &amp;&amp; This.Flash
			This.ColonView()
	}
	Block(Param = &quot;&quot;) {
		If Param !=
			This._Block := Param
		Return This._Block
	}
	Option(key, option, ret=&quot;&quot;) {
		Local Match, Match1
		RegExMatch(option, &quot;iS)\|\s*&quot; key &quot;\s+(.*?)\s*\|&quot;, Match)
		Return ret != &quot;&quot; &amp;&amp; Match1 = &quot;&quot; ? ret  : Match1
	}
	OnButtonDown(wp, lp, msg, hwnd) {
		If !This.Mem.Ctrl.HasKey(hwnd) || (This.Mem.Gui[A_Gui]).Block()
			Return
		If (msg = This.WM_LBUTTONDOWN || msg = This.WM_LBUTTONDBLCLK)
			This.Step(1, This.Mem.Ctrl[hwnd].Name, A_Gui)
		Else
			This.Step(0, This.Mem.Ctrl[hwnd].Name, A_Gui)
		Return 1
	}
	OnMouseWheel(wp, lp, Msg, hwnd) {
		Local hCtrl
		MouseGetPos, , , , hCtrl, 2
		If !This.Mem.Ctrl.HasKey(hCtrl) || (This.Mem.Gui[This.Mem.Ctrl[hCtrl].Gui]).Block()
			Return
		This.Step((wp &gt;&gt; 16) = 120 ? 1 : 0, This.Mem.Ctrl[hCtrl].Name, This.Mem.Ctrl[hCtrl].Gui)
		Return 1
	}
	OnMbuttonDown(wp, lp, Msg, hwnd) {
		Local o, l
		If !This.Mem.Ctrl.HasKey(hwnd) || (o := This.Mem.Gui[A_Gui]).Block()
			Return
		l := SubStr(This.Mem.Ctrl[hwnd].Name, 1, 1)
		GuiControl, % A_Gui &quot;:&quot;, % o[&quot;h&quot; l 1], % o[l 1] := &quot;0&quot;
		GuiControl, % A_Gui &quot;:&quot;, % o[&quot;h&quot; l 2], % o[l 2] := &quot;0&quot;
		Return 1
	}
	Step(add, c, hwnd, o=&quot;&quot;, b=0) {
		Static a := {H1:2,H2:9,M1:5,M2:9,S1:5,S2:9}
		o := This.Mem.Gui[hwnd]
		o[c] := Format(&quot;{:d}&quot;, add ? (o[c] = a[c] ? 0 : o[c] + 1) : (o[c] = 0 ? a[c] : o[c] - 1))
		If InStr(c, &quot;h&quot;) &amp;&amp; (o.H1 o.H2 &gt; 23) &amp;&amp; (1, b := c = &quot;H2&quot;)
			GuiControl, % o.hwnd &quot;:&quot;, % o[&quot;hH2&quot;], % o.H2 := (c = &quot;H1&quot; || add ? &quot;0&quot; : &quot;3&quot;)
		If !b
			GuiControl, % o.hwnd &quot;:&quot;, % o[&quot;h&quot; c], % o[c]
	}
	Set(h, m, s) {
		Local k, v, d
		For k, v in [&quot;H1&quot;,&quot;H2&quot;,&quot;M1&quot;,&quot;M2&quot;,&quot;S1&quot;,&quot;S2&quot;]
			If This[v] != (d := SubStr(h m s, k, 1))
				GuiControl, % This.hwnd &quot;:&quot;, % This[&quot;h&quot; v], % This[v] := Format(&quot;{:d}&quot;, d)
	}
	SetTime(Time) {
		Local o
		If Time = 
			Return This.Watch ? This.Set(&quot;00&quot;, &quot;00&quot;, &quot;00&quot;) : This.Set(A_Hour, A_Min, A_Sec) 
		o := StrSplit(Time, &quot;:&quot;)
		This.Set(o[1], o[2], o[3])
	}
	Get(obj=0) {
		Local Time
		Time := This.h1 This.h2 &quot;:&quot; This.m1 This.m2 &quot;:&quot; This.s1 This.s2
		Return obj ? StrSplit(Time, &quot;:&quot;) : Time
	}
	StartClock() {
		Local obj
		If !This.Stop()
			Return 0
		This.Stop(0), This.Timer := 0, This.Watch := 0, This.InDay := 0, This.Loop := 0
		This.Set(A_Hour, A_Min, A_Sec)
		obj := ObjBindMethod(This, &quot;TimerClock&quot;)
		SetTimer, % obj, % &quot;-&quot; (1000 - A_Msec) + 100
		Return 1
	}
	StartTimer(Func=&quot;&quot;) {
		Local TimerPeriod, obj
		If !This.Stop() || This.Get() = &quot;00:00:00&quot;
			Return 0 
		This.Stop(0)
		TimerPeriod := This.HMSToMSec(This.h1 This.h2, This.m1 This.m2, This.s1 This.s2) 
		If !TimerPeriod
			Return 0, This.Stop(1)
		This.TimerStart := A_TickCount + 1000, This.TimerStartMsec := A_Msec
		This.TimerPeriod := TimerPeriod, This.Func := Func, This.Timer := 1, This.Watch := 0, This.InDay := 0, This.Loop := 0
		obj := ObjBindMethod(This, &quot;TimerTimer&quot;)
		SetTimer, % obj, % &quot;-&quot; 1100
		
		Return 1
	}
	StartWatch(Func=&quot;&quot;, Loop=0) {
		Local obj
		If !This.Stop()
			Return 0
		This.Stop(0)
		This.WatchStart := A_TickCount - This.HMSToMSec(This.h1 This.h2, This.m1 This.m2, This.s1 This.s2)
		This.WatchStartMsec := A_Msec, This.Func := Func, This.Timer := 0, This.Watch := 1, This.InDay := 0, This.Loop := Loop
		obj := ObjBindMethod(This, &quot;TimerWatch&quot;)
		SetTimer, % obj, % &quot;-&quot; 1100
		Return 1
	}
	StartTimerDay(Func=&quot;&quot;, Date=&quot;&quot;, Loop=0) {
		Local TimerPeriod, obj
		If !This.Stop()
			Return 0
		If Date = User
			TimerPeriod := This.DifferenceTime((This.CheckDate := This.Get()), A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec, 1) - A_Msec
		Else If Date
			TimerPeriod := This.DifferenceTime((This.CheckDate := Date), A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec, 1) - A_Msec
		Else
			TimerPeriod := 86400000 - A_Msec, This.CheckDate := A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec
		If !TimerPeriod
			Return 0, This.Stop(1)
		This.TimerStart := A_TickCount + 1000, This.TimerStartMsec := 0, This.TimerPeriod := TimerPeriod
		This.Timer := 1, This.Watch := 0, This.InDay := 1, This.Func := Func, This.Stop(0), This.Loop := Loop
		This.SetTime(This.FormatTime(TimerPeriod))
		obj := ObjBindMethod(This, &quot;TimerTimer&quot;)
		SetTimer, % obj, % &quot;-&quot; 10
		Return 1
	}
	StartWatchDay(Func=&quot;&quot;, Date=&quot;&quot;, Loop=0) {
		Local obj
		If !This.Stop()
			Return 0
		If Date = User
			This.WatchStart := A_TickCount - (This.DifferenceTime(A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec, (This.CheckDate := This.Get()), 1) + A_Msec)
		Else If Date
			This.WatchStart := A_TickCount - (This.DifferenceTime(A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec, (This.CheckDate := Date), 1) + A_Msec)
		Else
			This.WatchStart := A_TickCount - A_Msec, This.CheckDate := A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec
		This.Watch := 1, This.Timer := 0, This.InDay := 1, This.Loop := Loop
		This.WatchStartMsec := 0, This.Func := Func, This.Stop(0)
		obj := ObjBindMethod(This, &quot;TimerWatch&quot;)
		SetTimer, % obj, % &quot;-&quot; 10
		Return 1
	}
	TimerTimer() {
		Local Time, obj, obj2, t
		If This.Stop()
			Return
		Time := This.FormatTime(This.TimerPeriod - (A_TickCount - This.TimerStart))
		This.SetTime(Time)
		This.CheckFlash()
		If Time = 00:00:00
		{
			If !This.Loop
				Return This.Stop(1), Func(This.Func).Call(This)
			This.TimerStart := A_TickCount + 1000
			TimerPeriod := This.DifferenceTime(This.CheckDate, A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec, 1) - A_Msec
			This.TimerPeriod := TimerPeriod &lt;= 0 ? 86400000 + TimerPeriod : TimerPeriod
			obj2 := Func(This.Func).Bind(This)
			Try SetTimer, % obj2, -50
		}
		If This.InDay
			t := (1000 - A_Msec)
		Else
			t := This.TimerStartMsec - A_Msec, t := (t &lt; 0 ? 1000 + t : t)
		obj := ObjBindMethod(This, &quot;TimerTimer&quot;)
		SetTimer, % obj, % &quot;-&quot; t + 100
	}
	TimerWatch() {
		Local Time, obj, obj2, t
		If This.Stop()
			Return
		If (t := A_TickCount - This.WatchStart) &gt; 86399999
		{
			If !This.Loop
				Return This.Stop(1), This.SetTime(&quot;00:00:00&quot;), Func(This.Func).Call(This)
			obj2 := Func(This.Func).Bind(This)
			Try SetTimer, % obj2, -50
			Time := &quot;00:00:00&quot;, This.WatchStart += 86400000
		}
		Else
			Time := This.FormatTime(t)
		This.SetTime(Time)
		This.CheckFlash()
		If This.InDay
			t := (1000 - A_Msec)
		Else
			t := This.WatchStartMsec - A_Msec, t := (t &lt; 0 ? 1000 + t : t)
		obj := ObjBindMethod(This, &quot;TimerWatch&quot;)
		SetTimer, % obj, % &quot;-&quot; t + 100
	}
	Reset() {
		This.Stop(1)
		This.Set(&quot;00&quot;, &quot;00&quot;, &quot;00&quot;)
	}
	TimerClock() {
		Local obj
		If This.Stop()
			Return
		This.Set(A_Hour, A_Min, A_Sec)
		This.CheckFlash()
		obj := ObjBindMethod(This, &quot;TimerClock&quot;)
		SetTimer, % obj, % &quot;-&quot; (1000 - A_Msec) + 100
	}
	CheckFlash() {
		Local obj
		If !This.Flash
			Return
		DllCall(&quot;ShowWindowAsync&quot;, &quot;Ptr&quot;, This.hF1, &quot;Int&quot;, 0)
		If This.Sec
			DllCall(&quot;ShowWindowAsync&quot;, &quot;Ptr&quot;, This.hF2, &quot;Int&quot;, 0)
		obj := ObjBindMethod(This, &quot;ColonView&quot;)
		SetTimer, % obj, % &quot;-&quot; This.FlashTime
	}
	ColonView() {
		DllCall(&quot;ShowWindowAsync&quot;, &quot;Ptr&quot;, This.hF1, &quot;Int&quot;, 1)
		If This.Sec
			DllCall(&quot;ShowWindowAsync&quot;, &quot;Ptr&quot;, This.hF2, &quot;Int&quot;, 1)
	}
	Destroy() {
		Local k, v
		If !This
			Return
		This.Stop(1)
		Gui, % This.hWnd &quot;:Destroy&quot;
		For k, v in [&quot;hS1&quot;,&quot;hM1&quot;,&quot;hH1&quot;,&quot;hS2&quot;,&quot;hM2&quot;,&quot;hH2&quot;]
			This.Mem.Ctrl.Delete(This[v])
		This.Mem.Gui.Delete(This.hWnd)
		This.Delete(Chr(0), Chr(0x10FFFF))
		This.Delete(This.MinIndex(), This.MaxIndex())
		This.SetCapacity(0)
		This.Base := &quot;&quot;
	}
	MathTime(Time1, S, Time2) {
		Local T
		Time1 := Time1 = &quot;&quot; ? A_Hour &quot;:&quot; A_Min &quot;:&quot; A_Sec : Time1
		T := This.StrToMSec(Time1) + (S This.StrToMSec(Time2))
		T := Mod(T, 86400000)
		Return This.FormatTime(T &lt; 0 ? 86400000 + T : T)
	}
	FormatTime(Time) {
		Local Rest, Hours, Min, Sec, MSec
		If Time &lt; 0
			Return &quot;00:00:00&quot;
		Rest := Mod(Time, 3600000)
		Hours := Format(&quot;{:02d}&quot;, Time // 3600000)
		Min := Format(&quot;{:02d}&quot;, Rest // 60000)
		Sec := Format(&quot;{:02d}&quot;, Mod(Rest, 60000) // 1000)
		; MSec := Format(&quot;{:03d}&quot;, Mod(Rest, 1000))
		Return Hours &quot;:&quot; Min &quot;:&quot; Sec
	}
	StrToMSec(Time) {
		Local o
		o := StrSplit(Time, &quot;:&quot;)
		Return This.HMSToMSec(o[1], o[2], o[3])
	}
	HMSToMSec(h, m, s=0) {
		Local sec
		sec := h * 3600
		sec += m * 60
		sec += s
		Return sec * 1000
	}
	DifferenceTime(Time1, Time2, Day=0) {
		Local T
		T := StrSplit(Time1, &quot;:&quot;)
		Time1 := This.HMSToMSec(T[1], T[2], (T[3] ? T[3] : &quot;00&quot;))
		T := StrSplit(Time2, &quot;:&quot;)
		Time2 := This.HMSToMSec(T[1], T[2], (T[3] ? T[3] : &quot;00&quot;))
		T := Time1 - Time2
		If !Day
			Return T
		T := Mod(T, 86400000)
		If T &lt; 0
			Return 86400000 + T
		Return T
	}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2018-08-07T13:54:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127740#p127740</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127734#p127734" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DaGer пишет:</cite><blockquote><p>Еще вопрос, нужно на изображении сделать таймер с отсчетом, когда нажимаю на кнопку он на изображении начинает отсчитывать например с 10 до 0 как это можно сделать?</p></blockquote></div><p>Наверно самый тупой и колхрзный способ который может существовать вообще <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><div class="codebox"><pre><code>tim:=10
F12::
loop
{
Gui, -Caption +AlwaysOnTop +ToolWindow
Gui, Color, EEAA99
Gui, +Lastfound 
WinSet, TransColor, EEAA99
Gui, Add, Text,, %tim%
Gui, Show
sleep 1000
tim--
Gui, Destroy
if (tim == -1)
{
tim:=10
break
}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2018-08-07T10:11:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127734#p127734</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127733#p127733" />
			<content type="html"><![CDATA[<p>Иными словами, Ваше неумение пользоваться поиском, даёт Вам право быть дерзким и делать другим замечания, если их реакция на первое не соответствует Вашим ожиданиям?</p><p>Первый вариант по запросу <a href="https://www.google.ru/search?newwindow=1&amp;ei=zWNpW4-6Aueb6AShobdw&amp;q=autohotkey+overlay+window&amp;oq=autohotkey+overlay&amp;gs_l=psy-ab.3.2.0i203k1l2j0j0i22i30k1l7.162785.164572.0.167965.7.7.0.0.0.0.102.478.6j1.7.0....0...1.1.64.psy-ab..0.7.467...35i39k1.0.UpjYoolM2uE">autohotkey overlay window</a>.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-08-07T09:33:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127733#p127733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127732#p127732" />
			<content type="html"><![CDATA[<p>Прежде чем лезть суда и задавать очередной вопрос, я первом делом пытаюсь найти что нибудь в интернете. Если я не понимаю чего то или не могу найти нужное мне решение моей проблемы тогда я обращаюсь к вам с помощью. И тут меня снова отправляют искать где то там.</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-07T04:06:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127732#p127732</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127731#p127731" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DaGer пишет:</cite><blockquote><p><strong>qqlexa</strong> <br />Спасибо большое, команда &quot;WinSet Transparent&quot; все решила.<br /> <strong>stealzy</strong><br />Место того чтобы писать это можно было скинуть сылку на справочник с нужной мне командой или показать на примере кода...<br />Ах да это так сложно извините дурака.<br />А если вы не знаете ответ на мой вопрос, можно промолчать и не засорять тему.</p></blockquote></div><p>Когда Вас подталкивают к решению - это тоже помощь и очевидно, что следующий, этим советом воспользовался, найдя ответ так же запросто, как Вы озаглавили свою просьбу в его поиске. Тогда получается, что поиском воспользовались вместо Вас и просьба &quot;погуглить за меня&quot; - такой же мусор, которым не стоило засорять тему с самого её начала, но в отличии от Вас, Вам, на это никто не указывал, а лишь тактично предложили самый первый из инструментов, которым бы воспользовался каждый следующий.</p><p>Не умеете быть вежливым и не отличаете протянутую руку от издевательства - будьте сдержанным.<br />Не всё то <em>пиво</em>, что пенится и не всё то <em>солнышко</em>, что встаёт.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-08-07T01:03:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127731#p127731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127730#p127730" />
			<content type="html"><![CDATA[<p>Еще вопрос, нужно на изображении сделать таймер с отсчетом, когда нажимаю на кнопку он на изображении начинает отсчитывать например с 10 до 0 как это можно сделать?</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-06T21:02:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127730#p127730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127729#p127729" />
			<content type="html"><![CDATA[<p><strong>qqlexa</strong> <br />Спасибо большое, команда &quot;WinSet Transparent&quot; все решила.<br /> <strong>stealzy</strong><br />Место того чтобы писать это можно было скинуть сылку на справочник с нужной мне командой или показать на примере кода...<br />Ах да это так сложно извините дурака.<br />А если вы не знаете ответ на мой вопрос, можно промолчать и не засорять тему.</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-06T20:50:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127729#p127729</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127699#p127699" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=13961">http://forum.script-coding.com/viewtopic.php?id=13961</a></p>]]></content>
			<author>
				<name><![CDATA[qqlexa]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39096</uri>
			</author>
			<updated>2018-08-05T12:07:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127699#p127699</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как сделать Overlay.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127694#p127694" />
			<content type="html"><![CDATA[<p>Нужно вывести изображение по верх всех окон и чтобы оно не было кликабельный, Чтобы когда я работая в приложении случайно не нажал на него. Пытался использовать &quot;SplashImage&quot; выводит по верх всех окон изображение, но при нажатии на изображение переключается на него. Как это убрать или есть другой способ вывода изображения по верх всех окон?</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-08-05T02:39:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127694#p127694</id>
		</entry>
</feed>
