<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Лупа для игр.]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=15562&amp;type=atom" />
	<updated>2020-07-29T17:04:37Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=15562</id>
		<entry>
			<title type="html"><![CDATA[Лупа для игр.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=141224#p141224" />
			<content type="html"><![CDATA[<p>Добрый день, нуждаюсь в помощи со следующей реализацией кода.. <br />ИДЕЯ: Хочу сделать лупу участка (к примеру центра) участком и выводить этот участок больше например сбоку. <br />ПРОБЛЕМЫ: Вывод хорошо (код ниже), но в игре когда кручусь по сторонам мышка которую не видно тоже ездит из угла в угол.. и когда попадает на экран который показывает результат увеличения и я хочу стрельнуть оно переключается на этот экранчик. А когда делаю через код в инете пропуск клика.. то для этого нужно +lastfound а из-за него неработает лупа.. как сделать чтобы оно увеличивало и в тоже время пропускало клик ?</p><div class="codebox"><pre><code>#NoEnv
#NoTrayIcon
SetBatchLines -1
OnExit,GuiClose
SetFormat,float,6.0
SysGet,w,MonitorWorkArea
wbottom+=30
zoom=4
Rx=128
Ry=128
Zx:=Rx/zoom
Zy:=Ry/zoom
paused=0
start=1

WinSet_Click_Through(I, T=&quot;254&quot;) {
	IfWinExist, % &quot;ahk_id &quot; I
	{
		If (T == &quot;Off&quot;)
		{
			WinSet, AlwaysOnTop, Off, % &quot;ahk_id &quot; I
			WinSet, Transparent, Off, % &quot;ahk_id &quot; I
			WinSet, ExStyle, -0x20, % &quot;ahk_id &quot; I
		}
		Else
		{
			WinSet, AlwaysOnTop, On, % &quot;ahk_id &quot; I
			If(T &lt; 0 || T &gt; 254 || T == &quot;On&quot;)
				T := 254
			WinSet, Transparent, % T, % &quot;ahk_id &quot; I
			WinSet, ExStyle, +0x20, % &quot;ahk_id &quot; I
		}
	}
	Else
		Return 0
}

Gui,3:-Caption +Border +ToolWindow +AlwaysOnTop 
Gui,3:Color,EEEEEE
Gui,3:Margin,0,0


Gui,+AlwaysOnTop +Resize +ToolWindow -Caption +LastFound
ID:= WinExist()
Gui,Show, % &quot;w&quot; 2*Rx &quot; h&quot; 2*Ry &quot; x0 y0&quot;,ZoomW
WinSet_Click_Through(ID)
GuiControl,, ZoomW, Un-Clickable


WinGet,ID,id,ZoomW
WinGet,PrintSourceID,ID
hdd_frame:=DllCall(&quot;GetDC&quot;,UInt,PrintSourceID)
hdc_frame:=DllCall(&quot;GetDC&quot;,UInt,ID)

GuiSize:
loop
{
sleep,10

GetKeyState,rctrl,rctrl,P
if (rctrl=&quot;D&quot;)
{
  if paused=0
  {
    Gui,Hide
    Gui,3:Hide
    paused=1
    sleep,500
    tooltip,
  }
  else
  {
    pausedchek=0
    Gui,Show
    paused=0
    sleep,500
  }
}

if paused=0
{
WinGetPos,winx,winy,Wn,Hn,ZoomW
wn-=8
Hn-=26
Rx:=Wn/2
Ry:=Hn/2
Zx:=Rx/zoom
Zy:=Ry/zoom
xz:=(1920/2)-(Rx/4)
yz:=(1080/2)-(Ry/4)
DllCall(&quot;gdi32.dll\StretchBlt&quot;,UInt,hdc_frame,Int,0,Int,0,Int,2*Rx,Int,2*Ry,UInt,hdd_frame,UInt,xz,UInt,yz,Int,2*Zx,Int,2*Zy,UInt,0xCC0020) 
ww=%Zx%
hh=%Zy%
ww*=2
hh*=2
xx=%xz%
yy=%yz%
xx-=1
yy-=1
Gui,3:Show,x%xx% y%yy% w%ww% h%hh% NoActivate,frame
;Tooltip, %xx% and %yy% or %Rx% and %Ry%
WinGet,guiid,ID,frame
WinSet,TransColor,EEEEEE,ahk_id %guiid%
ifwinactive,frame
{
  zoom-=1
  winactivate,ahk_class Shell_TrayWnd
}

In(x,a,b)
{
   IfLess x,%a%,Return a
   IfLess b,%x%,Return b
   Return x
}

}
else
  sleep,100
}
Return

^WheelUp::
^WheelDoWn::
If (A_ThisHotKey=&quot;^WheelUp&quot;)
  zoom+=1
If (A_ThisHotKey=&quot;^WheelDoWn&quot;)
  zoom-=1
if zoom&lt;1
  zoom=1
if zoom&gt;35
  zoom=35
Zx:=Rx/zoom
Zy:=Ry/zoom
Return

GuiClose:
DllCall(&quot;gdi32.dll\DeleteDC&quot;,UInt,hdc_frame)
DllCall(&quot;gdi32.dll\DeleteDC&quot;,UInt,hdd_frame)
ExitApp

f4::exitapp
^space::reload</code></pre></div>]]></content>
			<author>
				<name><![CDATA[EnvyChild]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41003</uri>
			</author>
			<updated>2020-07-29T17:04:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=141224#p141224</id>
		</entry>
</feed>
