Jump to content

Help with magnifier function


Nahuel
 Share

Recommended Posts

I'm using this brilliant script by Larry to make a script. I'd like to know if I can make the magnifier window just like the one that Autoit window info tool has:

Posted Image

I need it like that because it would give me more accuracy for what I want to do.

here's Larry's script:

Global $SRCCOPY = 0x00CC0020
Global $leave = 0

HotKeySet("{PAUSE}","leave")

SplashTextOn ( "AU3MAG", "" , 100 , 100 , 0, 0, 1 )
$MyhWnd = WinGetHandle("AU3MAG")

While Not $leave
  Sleep(25)
  MAG()
WEnd

Func MAG()
  $MyHDC = DLLCall("user32.dll","int","GetDC","hwnd",$MyhWnd)
  If @error Then Return
  $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0)
  If Not @error Then
     $xy = MouseGetPos()
     If Not @error Then
        $l = $xy[0]-10
        $t = $xy[1]-10
        DLLCall("gdi32.dll","int","StretchBlt","int",$MyHDC[0],"int",_
                    0,"int",0,"int",100,"int",100,"int",$DeskHDC[0],"int",_
                    $l,"int",$t,"int",20,"int",20,"long",$SRCCOPY)
     EndIf
     DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0)
  EndIf
  DLLCall("user32.dll","int","ReleaseDC","int",$MyHDC[0],"hwnd",$MyhWnd)
EndFunc

Func leave()
  $leave = 1
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...