<?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=12326</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12326&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Анимация при нажатии ЛКМ».]]></description>
		<lastBuildDate>Wed, 18 Jan 2017 15:04:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111221#p111221</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>DllCall(&quot;gdiplus\GdipCreatePen1&quot;, Int, ((RippleAlpha -= RippleAlphaStep) &lt;&lt; 24) | RippleColor, float, <strong>30</strong>, Int, 2, UIntP, pRipplePen)<br />&nbsp; &nbsp; &nbsp; &nbsp; DllCall(&quot;gdiplus\GdipDrawEllipse&quot;, UInt, pRippleGraphics, UInt, pRipplePen, float, <strong>15</strong>, float, <strong>15</strong>, float, RippleDiameter <strong>- 25</strong>, float, RippleDiameter <strong>- 25</strong>)</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 18 Jan 2017 15:04:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111221#p111221</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111218#p111218</link>
			<description><![CDATA[<p>Malcev, Спасибо, за скрипт!</p><p>Подскажите пожалуйста.. можно ли изменить&nbsp; толщину кругов? если да то какой параметр отвечает за это?</p>]]></description>
			<author><![CDATA[null@example.com (terra-4)]]></author>
			<pubDate>Wed, 18 Jan 2017 14:08:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111218#p111218</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111205#p111205</link>
			<description><![CDATA[<p>Объекты удалил.<br />Хотя, судя по этой теме это делать вроде необязательно.<br />Виндовс сам все подчистит при выходе из программы:<br /><a href="http://stackoverflow.com/questions/30157624/what-are-the-consequences-of-not-calling-gdiplusshutdown-before-exiting-an-appli">http://stackoverflow.com/questions/3015 … g-an-appli</a><br />Размерность сам точно не поменяю.<br />Беды с ней особо не вижу - на 64 бит у меня работает.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 18 Jan 2017 04:13:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111205#p111205</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111197#p111197</link>
			<description><![CDATA[<p>Объекты, созданные в начале скрипта, обязательно должны удаляться. Ну и с размерностью опять беда.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 17 Jan 2017 21:27:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111197#p111197</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111194#p111194</link>
			<description><![CDATA[<p>Можно регулировать прозрачность RippleAlphaMax.<br />При значении 500 у меня видно.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 17 Jan 2017 19:01:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111194#p111194</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111193#p111193</link>
			<description><![CDATA[<p>Вот так показывает анимацию. Но в стандартном варианте мелькания. </p><div class="codebox"><pre><code>~LButton:: Send {LCtrl}</code></pre></div><p><strong>Malcev</strong>, ещё бы для полного счастья учесть чёрный фон, на нём не видно.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 17 Jan 2017 18:28:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111193#p111193</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111192#p111192</link>
			<description><![CDATA[<div class="codebox"><pre><code>#NoEnv
OnExit, ExitSub
CoordMode Mouse, Screen
Setup()

~LButton::ShowRipple(LeftClickRippleColor)
~RButton::ShowRipple(RightClickRippleColor)
~LControl Up::ShowRipple(MouseIdleRippleColor)

Setup()
{
    Global
    RippleWinSize := 200
    RippleStep := 10
    RippleMinSize := 10
    RippleMaxSize := RippleWinSize - 20
    RippleAlphaMax := 0x60
    RippleAlphaStep := RippleAlphaMax // ((RippleMaxSize - RippleMinSize) / RippleStep)
    RippleVisible := False
    LeftClickRippleColor := 0xff0000
    RightClickRippleColor := 0x0000ff
    MouseIdleRippleColor := 0x008000
    
    DllCall(&quot;LoadLibrary&quot;, Str, &quot;gdiplus.dll&quot;)
    VarSetCapacity(buf, 16, 0)
    NumPut(1, buf)
    DllCall(&quot;gdiplus\GdiplusStartup&quot;, UIntP, pToken, UInt, &amp;buf, UInt, 0)
    
    Gui Ripple: -Caption +LastFound +AlwaysOnTop +ToolWindow +Owner +E0x80000
    Gui Ripple: Show, NA, RippleWin
    hRippleWin := WinExist(&quot;RippleWin&quot;)
    hRippleDC := DllCall(&quot;GetDC&quot;, UInt, 0)
    VarSetCapacity(buf, 40, 0)
    NumPut(40, buf, 0)
    NumPut(RippleWinSize, buf, 4)
    NumPut(RippleWinSize, buf, 8)
    NumPut(1, buf, 12, &quot;ushort&quot;)
    NumPut(32, buf, 14, &quot;ushort&quot;)
    NumPut(0, buf, 16)
    hRippleBmp := DllCall(&quot;CreateDIBSection&quot;, UInt, hRippleDC, UInt, &amp;buf, UInt, 0, UIntP, ppvBits, UInt, 0, UInt, 0)
    DllCall(&quot;ReleaseDC&quot;, UInt, 0, UInt, hRippleDC)
    hRippleDC := DllCall(&quot;CreateCompatibleDC&quot;, UInt, 0)
    DllCall(&quot;SelectObject&quot;, UInt, hRippleDC, UInt, hRippleBmp)
    DllCall(&quot;gdiplus\GdipCreateFromHDC&quot;, UInt, hRippleDC, UIntP, pRippleGraphics)
    DllCall(&quot;gdiplus\GdipSetSmoothingMode&quot;, UInt, pRippleGraphics, Int, 4)
    
    MouseGetPos _lastX, _lastY
    SetTimer MouseIdleTimer, 5000
    Return

MouseIdleTimer:
    MouseGetPos _x, _y
    if (_x == _lastX and _y == _lastY)
        ShowRipple(MouseIdleRippleColor, _interval:=20)
    else
        _lastX := _x, _lastY := _y
    Return
}

ShowRipple(_color, _interval:=10)
{
    Global
    if (RippleVisible)
    	Return
    RippleColor := _color
    RippleDiameter := RippleMinSize
    RippleAlpha := RippleAlphaMax
    RippleVisible := True

    MouseGetPos _pointerX, _pointerY
    SetTimer RippleTimer, % _interval
    Return

RippleTimer:
    DllCall(&quot;gdiplus\GdipGraphicsClear&quot;, UInt, pRippleGraphics, Int, 0)
    if ((RippleDiameter += RippleStep) &lt; RippleMaxSize) {
        DllCall(&quot;gdiplus\GdipCreatePen1&quot;, Int, ((RippleAlpha -= RippleAlphaStep) &lt;&lt; 24) | RippleColor, float, 3, Int, 2, UIntP, pRipplePen)
        DllCall(&quot;gdiplus\GdipDrawEllipse&quot;, UInt, pRippleGraphics, UInt, pRipplePen, float, 1, float, 1, float, RippleDiameter - 1, float, RippleDiameter - 1)
        DllCall(&quot;gdiplus\GdipDeletePen&quot;, UInt, pRipplePen)
    }
    else {
        RippleVisible := False
        SetTimer RippleTimer, Off
    }

    VarSetCapacity(buf, 8)
    NumPut(_pointerX - RippleDiameter // 2, buf, 0)
    NumPut(_pointerY - RippleDiameter // 2, buf, 4)
    DllCall(&quot;UpdateLayeredWindow&quot;, UInt, hRippleWin, UInt, 0, UInt, &amp;buf, Int64p, (RippleDiameter + 5) | (RippleDiameter + 5) &lt;&lt; 32, UInt, hRippleDC, Int64p, 0, UInt, 0, UIntP, 0x1FF0000, UInt, 2)
    Return
}

ExitSub:
DllCall(&quot;DeleteObject&quot;, &quot;ptr&quot;, hRippleBmp)
DllCall(&quot;DeleteDC&quot;, &quot;ptr&quot;, hRippleDC)
DllCall(&quot;gdiplus\GdipDeleteGraphics&quot;, &quot;ptr&quot;, pRippleGraphics)
DllCall(&quot;gdiplus\GdiplusShutdown&quot;, &quot;uptr&quot;, pToken)
if hModule := DllCall(&quot;GetModuleHandle&quot;, &quot;str&quot;, &quot;gdiplus&quot;, &quot;ptr&quot;)
   DllCall(&quot;FreeLibrary&quot;, &quot;ptr&quot;, hModule)
ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 17 Jan 2017 18:18:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111192#p111192</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111191#p111191</link>
			<description><![CDATA[<p>Как вариант можно отправить нажатие ctrl в окно, которое не реагирует на него. Например нажал ЛКМ - разворачивается заранее открытое окно блокнота, туда отправляется ctrl, окно сворачивается. Правда я бы сказал как это называется, да тут форум приличный <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Tue, 17 Jan 2017 17:49:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111191#p111191</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111190#p111190</link>
			<description><![CDATA[<p>Сомневаюсь, что без gdi+ что-то можно путное сделать.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 17 Jan 2017 15:04:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111190#p111190</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111189#p111189</link>
			<description><![CDATA[<p><strong>terra-4</strong>, некорректные действия можно обойти только тогда, когда данное окно не реагирует на клавишу LCRTL - не важно какие задержки. Возможно ypppu объяснит, как можно это сделать стандартными средствами.</p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Tue, 17 Jan 2017 13:43:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111189#p111189</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111184#p111184</link>
			<description><![CDATA[<p>Задача была про анимацию щелчков ЛКМ. И она успешно решается стандартными средствами. При чём тут SendInput {LControl}? Для чего вообще скрипт писать?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 17 Jan 2017 13:19:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111184#p111184</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111180#p111180</link>
			<description><![CDATA[<p><strong>belyankin12</strong>, да нажатие CTLR всегда, после нажатии ЛКМ, но как некорректные действие можно обойти.. я поставил &quot;Sleep 80&quot; возможно тут только подбирать паузу между действиями.</p><p>А есть у вас, идея как что то подобное сделать средствами AutoHotkey?</p>]]></description>
			<author><![CDATA[null@example.com (terra-4)]]></author>
			<pubDate>Tue, 17 Jan 2017 11:35:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111180#p111180</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111177#p111177</link>
			<description><![CDATA[<p>Некорректные действия связаны с тем, что у тебя идёт нажатие клавиши CTLR.</p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Tue, 17 Jan 2017 10:51:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111177#p111177</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Анимация при нажатии ЛКМ]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=111174#p111174</link>
			<description><![CDATA[<p>Всем Хорошего времени суток.</p><p>Пожалуйста, помогите&nbsp; со скрипом.</p><p>Задача скрипта, сигнализировать при нажатии ЛКМ, мне известно про такую возможность виде сходящихся кругов в&nbsp; Панель управления - Мышь - Параметры указателя = Обозначить расположения указателя при нажатии CTRL (установить галочку)..</p><p>На основе этой возможности в Windows, мне удалось собрать это:</p><div class="codebox"><pre><code>~LButton::
	Sleep 80
		SendInput {LControl}
return</code></pre></div><p>К сожалению, иногда работает некорректно, вызывая незапланированные действия, возможно, это связано с задержкой…</p><p>Может у кого есть что то лучше поделитесь, пожалуйста.</p>]]></description>
			<author><![CDATA[null@example.com (terra-4)]]></author>
			<pubDate>Tue, 17 Jan 2017 09:29:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=111174#p111174</guid>
		</item>
	</channel>
</rss>
