像素放大镜

#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}}人
人已捐赠
AHKV1教程

【学习】V1类demo

2021-11-14 16:05:35

AHKV1

初入AHk,望大佬 解惑

2021-11-21 13:28:47

6 条回复 A文章作者 M管理员
  1. 灰梦灰

    棒棒哒

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

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

  4. […] cialis in canada […]

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

  6. […] casino online usa paypal […]

个人中心
有新私信 私信列表
搜索