像素放大镜

#NoEnv
SetBatchLines -1
CoordMode Mouse, Screen

Gui 放大镜:+AlwaysOnTop -Caption
Gui 放大镜:Show,w210 h210,放大镜界面

WinGet 桌面句柄,id
WinGet 放大镜句柄,id,放大镜界面
桌面HDC:=DllCall("GetDC",uint,桌面句柄)
放大镜HDC:=DllCall("GetDC",uint,放大镜句柄)

Settimer,Loops,0
Settimer,Loops2,0
Loops:
画笔:= DllCall("gdi32.dll\CreatePen","int",0,"int",1,"uint",0x000000)
画笔2:= DllCall("gdi32.dll\CreatePen","int",0,"int",1,"uint",0xffffff)
DllCall( "gdi32.dll\SelectObject","uint",放大镜HDC,"uint",画笔)
;竖
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",100,"int",100,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",100,"int",111)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",110,"int",100,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",110,"int",111)
;横
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",100,"int",100,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",110,"int",100)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",100,"int",110,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",110,"int",110)
;点
DllCall( "gdi32.dll\SelectObject","uint",放大镜HDC,"uint",画笔2)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",101,"int",101,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",101,"int",110)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",101,"int",101,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",110,"int",101)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",109,"int",109,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",109,"int",100)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",109,"int",109,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",100,"int",109)

;外边框
DllCall( "gdi32.dll\SelectObject","uint",放大镜HDC,"uint",画笔)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",0,"int",0,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",210,"int",0)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",0,"int",0,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",0,"int",210)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",209,"int",209,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",209,"int",0)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",209,"int",209,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",0,"int",209)
;内
DllCall( "gdi32.dll\SelectObject","uint",放大镜HDC,"uint",画笔2)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",1,"int",1,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",209,"int",1)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",1,"int",1,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",1,"int",209)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",208,"int",208,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",208,"int",0)
DllCall( "gdi32.dll\MoveToEx","uint",放大镜HDC,"int",208,"int",208,"uint", 0)
DllCall( "gdi32.dll\LineTo","uint",放大镜HDC,"int",0,"int",208)
Return

Loops2:
MouseGetPos,MouseX,MouseY
if(MouseY>1080-260){
  y:=MouseY-300
}else{
  y:=MouseY-0
}
if(MouseX>1920-260){
  x:=MouseX-300
}else{
  x:=MouseX+50
}
WinMove,放大镜界面,,%x%,%y%,210,210 ;移动指定窗口位置&设置尺寸
MouseGetPos,MouseX,MouseY
DllCall("gdi32.dll\StretchBlt",uint,放大镜HDC,int,0,int,0,int,200*10,int,200*10,uint,桌面HDC,int,MouseX-100/10,int,MouseY-100/10,int,200,int,200,uint,0xCC0020)
Return

~C::
MouseGetPos,MouseX,MouseY
PixelGetColor,color,%MouseX%,%MouseY%
Clipboard:=MouseX "," MouseY "," color
SoundBeep
Return

~!V::
MouseGetPos,MouseX,MouseY
Global SetX:=MouseX
Global SetY:=MouseY
Return

~V::
PixelGetColor,color,%SetX%,%SetY%
Clipboard:=SetX "," SetY "," color
SoundBeep
Return


~Up::MouseMove, 0, -1, 0, R
~Down::MouseMove, 0, 1, 0, R
~Left::MouseMove, -1, 0, 0, R
~Right::MouseMove, 1, 0, 0, R
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA捐赠
共{{data.count}}人
人已捐赠
其他

好用的五款开源网络工具

2021-11-16 16:16:58

其他

初入AHk,望大佬 解惑

2021-11-21 13:28:47

6 条回复 A文章作者 M管理员
  1. […] casino online usa paypal […]

  2. […] viagra 100mg price per pill […]

  3. […] cialis in canada […]

  4. […] how much is the 5 mg dose of cialis […]

  5. […] street value viagra 50mg […]

  6. 灰梦灰

    棒棒哒

个人中心
购物车
优惠劵
有新私信 私信列表
搜索