<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Имитация Lazymouse (Zbrush)]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16627</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16627&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Имитация Lazymouse (Zbrush)».]]></description>
		<lastBuildDate>Mon, 04 Oct 2021 23:51:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149910#p149910</link>
			<description><![CDATA[<p>Да, проверил на семёрке, в пайнте работает.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 04 Oct 2021 23:51:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149910#p149910</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149909#p149909</link>
			<description><![CDATA[<p>Но это как-раз несложно проверить тому у кого она есть.<br />Вон у пользователя на семерке везде работает, кроме как в фотошопе.<br /><a href="https://www.reddit.com/r/photoshop/comments/cjkj0q/silky_shark_wont_work_on_photoshop_cs6/">https://www.reddit.com/r/photoshop/comm … oshop_cs6/</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 04 Oct 2021 23:26:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149909#p149909</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149891#p149891</link>
			<description><![CDATA[<p>Пока не было времени посмотреть, но там требования Windows 8.1, Windows 10, так что может не так всё просто.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 04 Oct 2021 16:02:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149891#p149891</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149890#p149890</link>
			<description><![CDATA[<p>Судя по всему в коде используется хук на мышь и позиционирование виртуального курсора через RAWINPUT.<br />Так что можно и без dll.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 04 Oct 2021 15:47:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149890#p149890</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149883#p149883</link>
			<description><![CDATA[<p>Спасибо, только изучите <a href="https://forum.script-coding.com/misc.php?action=rules">правила оформления</a>, обратите внимание на избыточное цитирование, оформление ссылок и точки в конце предложений. Я отредактировал ваш пост.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 04 Oct 2021 12:12:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149883#p149883</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149882#p149882</link>
			<description><![CDATA[<p>Если разрешено давать ссылки, тогда пожалуйста, вот - <a href="https://github.com/stoicshark/silkyshark/releases">https://github.com/stoicshark/silkyshark/releases</a>.<br />(Не Ahk, но именно то, что нужно.)</p>]]></description>
			<author><![CDATA[null@example.com (Alexey_cake)]]></author>
			<pubDate>Mon, 04 Oct 2021 11:23:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149882#p149882</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149881#p149881</link>
			<description><![CDATA[<div class="quotebox"><cite>Alexey_cake пишет:</cite><blockquote><p>нашёл необходимый готовый инструмент на Github&#039;e</p></blockquote></div><p>Нашли — поделитесь.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 04 Oct 2021 11:17:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149881#p149881</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149880#p149880</link>
			<description><![CDATA[<p><strong>Foma</strong>, я вообще пошёл путём самурая:</p><p>В основе механизма &quot;слежки&quot; лежит теорема пифагора с прибамбасами. Константа в данном случае только значение радиуса реагирования &quot;рисующего&quot; курсора в сетке коородинат целевого окна. Если значение гипотенузы между &quot;рисующим&quot; курсором, старым положением курсора и его новым положением, больше, чем заданный порог радиуса реагирования, то &quot;рисующий&quot; курсор движется на их разницу по этой гипотенузе; если меньше, то стоит на месте.</p><p>В программировании я очень слаб, поэтому вывел формулу в excel (не смеяться. Я сказал не смеяться!), с помощью которой подобная идея работает. </p><p>Далее идея состояла в том, чтобы разница между координатами курсора и координатами &quot;рисующего&quot; курсора была Offset&#039;ом для имитации LButton, чтобы там шла линия. Пока искал как это сделать, нашёл необходимый готовый инструмент на Github&#039;e, так что кажется это уже не актуально.</p><p>Но всё равно всем спасибо за подсказки и внимание к теме.</p>]]></description>
			<author><![CDATA[null@example.com (Alexey_cake)]]></author>
			<pubDate>Mon, 04 Oct 2021 11:13:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149880#p149880</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149875#p149875</link>
			<description><![CDATA[<p>Я сам немного потыкал, пока понял насколько сложна задача.<br />Лучшие спецы форума вам написали, что и для них это не просто и долго.<br />Либо заказывайте у них в платном отделе, либо смиритесь.</p>]]></description>
			<author><![CDATA[null@example.com (Foma)]]></author>
			<pubDate>Mon, 04 Oct 2021 05:59:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149875#p149875</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149874#p149874</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Может топик-стартер возьмет какие-нибудь идеи из нашего разговора и попытается их воплотить.</p></blockquote></div><p>Ух ты, сколько ответов. Не ожидал, что это вообще кому-то будет интересно.<br />Спасибо, много интересной информации, конечно, кто-нибудь попробую применить из этого.<br /></p><div class="quotebox"><cite>Foma пишет:</cite><blockquote><div class="quotebox"><blockquote><p>с фотошопом таким способом не получится</p></blockquote></div><p> Потому я и спрашивал, для какого приложения. Для всех сразу - много совсем другой работы, не связанной с самим алгоритмом.</p></blockquote></div><p>Ну хотя бы для начала начать с простого, с Paint.</p>]]></description>
			<author><![CDATA[null@example.com (Alexey_cake)]]></author>
			<pubDate>Mon, 04 Oct 2021 03:23:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149874#p149874</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149851#p149851</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>с фотошопом таким способом не получится</p></blockquote></div><p> Потому я и спрашивал, для какого приложения. Для всех сразу - много совсем другой работы, не связанной с самим алгоритмом.</p>]]></description>
			<author><![CDATA[null@example.com (Foma)]]></author>
			<pubDate>Sat, 02 Oct 2021 14:08:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149851#p149851</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149850#p149850</link>
			<description><![CDATA[<p>У меня такого не наблюдается.<br />Но например с фотошопом таким способом не получится, так как перед посылом левой кнопки мыши его надо активировать.<br />Так что инжектить dll наиболее верный вариант.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sat, 02 Oct 2021 11:57:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149850#p149850</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149849#p149849</link>
			<description><![CDATA[<p>В целом идею понял, удалось заставить как-то работать. Но много сайд-эффектов, в частности, после завершения скрипта пайнт перестаёт функционировать нормально, мышь в нём начинает глючить.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 02 Oct 2021 08:24:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149849#p149849</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149848#p149848</link>
			<description><![CDATA[<p>У меня это не работает, просто мышь начинает глючить. Кроме того, не очень понимаю, почему это вообще должно работать — где у тебя вычисление координат видимой мыши?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 02 Oct 2021 07:04:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149848#p149848</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Имитация Lazymouse (Zbrush)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149847#p149847</link>
			<description><![CDATA[<p>Как я и писал можно и без хука.<br /></p><div class="codebox"><pre><code>x := 0
y := 200
w := 500
h := 500
global hpaint := 0x34094e

OnMessage(0x200, &quot;WM_MOUSEMOVE&quot;)
OnMessage(0x201, &quot;WM_LBUTTONDOWN&quot;)
OnMessage(0x202, &quot;WM_LBUTTONUP&quot;)
Gui, +HWNDhGui +AlwaysOnTop
DllCall(&quot;GetWindowBand&quot;, &quot;ptr&quot;, hGui, &quot;uint*&quot;, band)
Gui, Destroy
hGui := &quot;&quot;
if (band = 1)
{
   If (A_PtrSize = 8)
      RunWait &quot;C:\Program Files\AutoHotkey\AutoHotkeyU64_UIA.exe&quot; &quot;%A_ScriptFullPath%&quot;
   Else If A_IsUnicode
      RunWait &quot;C:\Program Files\AutoHotkey\AutoHotkeyU32_UIA.exe&quot; &quot;%A_ScriptFullPath%&quot;
   Else
      RunWait &quot;C:\Program Files\AutoHotkey\AutoHotkeyA32_UIA.exe&quot; &quot;%A_ScriptFullPath%&quot;
}
#SingleInstance Force
SetBatchLines -1
SetWinDelay -1
OnExit, Uninitialize 
Gui, +HWNDhGui -DPIScale -Caption +AlwaysOnTop +E0x02000000 +E0x00080000 ;  WS_EX_COMPOSITED := E0x02000000  WS_EX_LAYERED := E0x00080000
Gui, Show, x%x% y%y% w%w% h%h% NA

DllCall(&quot;LoadLibrary&quot;, &quot;str&quot;, &quot;magnification.dll&quot;)
DllCall(&quot;magnification.dll\MagInitialize&quot;)
hChildMagnifier := DllCall(&quot;CreateWindowEx&quot;, &quot;UInt&quot;, 0, &quot;Str&quot;, &quot;Magnifier&quot;, &quot;Str&quot;, &quot;MagnifierWindow&quot;, &quot;UInt&quot;, WS_CHILD := 0x40000000|4, &quot;Int&quot;, 0, &quot;Int&quot;, 0, &quot;Int&quot;, w, &quot;Int&quot;, h, &quot;Ptr&quot;, hGui, &quot;UInt&quot;, 0, &quot;Ptr&quot;, DllCall(&quot;GetWindowLong&quot; (A_PtrSize=8 ? &quot;Ptr&quot; : &quot;&quot;), &quot;Ptr&quot;, hGui, &quot;Int&quot;, GWL_HINSTANCE := -6 , &quot;ptr&quot;), &quot;UInt&quot;, 0, &quot;ptr&quot;)
WinShow, ahk_id %hChildMagnifier%
Loop
{
   if (A_PtrSize = 8)
   {
      VarSetCapacity(RECT, 16, 0)
      NumPut(x, RECT, 0, &quot;Int&quot;)
      NumPut(y, RECT, 4, &quot;Int&quot;)
      NumPut(w, RECT, 8, &quot;Int&quot;)
      NumPut(h, RECT, 12, &quot;Int&quot;)
      DllCall(&quot;magnification.dll\MagSetWindowSource&quot;, &quot;Ptr&quot;, hChildMagnifier, &quot;Ptr&quot;, &amp;RECT)
   }
   else
      DllCall(&quot;magnification.dll\MagSetWindowSource&quot;, &quot;Ptr&quot;, hChildMagnifier, &quot;Int&quot;, x, &quot;Int&quot;, y, &quot;Int&quot;, w, &quot;Int&quot;, h)
}
Return 

Uninitialize: 	
DllCall(&quot;magnification.dll\MagUninitialize&quot;)
ExitApp

WM_LBUTTONDOWN(wParam, lParam, Msg, hWnd)
{
   Critical
   PostMessage, Msg, wParam, lParam,, ahk_id %hpaint%
}

WM_LBUTTONUP(wParam, lParam, Msg, hWnd)
{
   Critical
   PostMessage, Msg, wParam, lParam,, ahk_id %hpaint% 
}

WM_MOUSEMOVE(wParam, lParam, Msg, hWnd)
{
   Critical
   PostMessage, Msg, wParam, lParam,, ahk_id %hpaint%
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sat, 02 Oct 2021 00:14:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149847#p149847</guid>
		</item>
	</channel>
</rss>
