So I decided to make my own version of this one.
Amazing work Holomind !!
Cred to all that made it possible..... I have just stolen code from all over the place and put the pieces together.
Dont forget that u need:
(see
http://www.autohotkey.com/forum/viewtopic.php?t=11860 for links)
GDIplusWrapper.ahk
DllCallStruct.ahk
BinaryEncodingDecoding.ahk
I made a magnifier version mostly to be able to make very accurate screencaptures...
And I added the colorpicker so I can check and see that the cap is exactly as the original (the bmp quality setting confuses me.... use noParams now

seem to work.
pics taken with this tool should be easy to relocate with imagesearch....
So features:
-Screen Capture part of screen (win+P is the hotkey)
-Magnifier of Selected area (any height and width)
(change big window fast with mouse.... use keyboard for pixelperfection)
-Dual hair cross (somewhat modified)
-colorpicker (TrayTooltip with color info about the pixel in the haircross)
Only spent a day on this one so it may contain some bugs....
known bug: added keywait on almost every "step-key" because if i let it run at full speed.... (the key repeat rate) it seem to be too fast and it hang and flickers...
it's possible to replace keywait with sleep,70 or something
So here is the code
Code:
#NoEnv
#Include GDIPlusWrapper.ahk
SetBatchLines -1
CoordMode Mouse, Screen
CoordMode Pixel, Screen
OnExit GuiClose
zoom = 9 ; initial magnification
aimH = 20 ; Height of aim window
aimW = 33 ; Width of aim window
;;;;;;;;;; GUI big ;;;;;;;;;;
Gui +AlwaysOnTop +Caption +Resize +ToolWindow
Gui Show, % "w" aimW*zoom " h" aimH*zoom " x0 y0", Magnifier
WinGet MagnifierID, id, Magnifier
WinSet Transparent, 255, Magnifier ; makes the window invisible to magnification
WinGet PrintSourceID, ID
;;;;;;;;;; GUI aim ;;;;;;;;;;
Gui 2:+AlwaysOnTop -Caption +ToolWindow +0x800000
Gui 2:Color, C
MouseGetPos mouseX, mouseY
Gui 2:Show, % "w" aimW " h" aimH " x" mouseX-aimW " y" mouseY-aimH, AimFrame
WinSet TransColor, C, AimFrame
hdd_frame := DllCall("GetDC", UInt, PrintSourceID)
hdc_frame := DllCall("GetDC", UInt, MagnifierID)
SetTimer Repaint, 50 ; flow through
;########## PROCEDURES ##########
;;;;;;;;;; Repaint - Updates the big window and displays the pixelcolor with TrayTip.
Repaint:
MouseGetPos mouseX, mouseY
PGC_Y:=mouseY-1
PGC_X:=mouseX-1
PixelGetColor, PGC, %PGC_X%, %PGC_Y%,RGB
TrayTip,, RGB PixelColor:`n%PGC%, 1,
xz := In(mouseX-aimW/2,-1,A_ScreenWidth-aimW+1) ; keep the frame on screen
yz := In(mouseY-aimH/2,-1,A_ScreenHeight-aimH+1) ;In(x,a,b) closest number to x in [a,b]
WinMove AimFrame,,%xz%, %yz%, % aimW, % aimH
DllCall("gdi32.dll\StretchBlt", UInt,hdc_frame, Int,0, Int,0, Int,aimW*zoom, Int,aimH*zoom
, UInt,hdd_frame, UInt,xz, UInt,yz, Int,aimW, Int,aimH, UInt,0xCC0020) ; SRCCOPY
DrawCross(aimW, aimH, zoom, hdc_frame)
Return
;;;;;;;;;; GuiSize - Scales the aim window if big is resized (and update caption on big window)
GuiSize:
aimW := A_GuiWidth/zoom
aimH := A_GuiHeight/zoom
aimW := round(aimW)
aimh := round(aimH)
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom
Return
;;;;;;;;;; Cleaning up ;;;;;;;;;;
GuiClose:
DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame )
DllCall("gdi32.dll\DeleteDC", UInt,hdd_frame )
ExitApp
;########## HOTKEYS ##########
;;;;;;;;;; Win+R - Reloads app ;;;;;;;;;;
#r::
keywait, Lwin
reload
return
;;;;;;;;;; Win+Up - Zooms In ;;;;;;;;;;
#Up::
if (((zoom+1)*aimW < A_ScreenWidth ) AND ((zoom+1)*aimH < (A_ScreenHeight-22) )) ;stops before window get bigger than screen
zoom+=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom ;update capion and size
keywait, up ;Added because I got some glitches when at full "key repeat"-rate
return
;;;;;;;;;; Win+Down - Zooms Out ;;;;;;;;;;
#Down::
if (zoom > 1) ;stop so it does go negative
zoom-=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom ;update capion and size
keywait, down ;Added because I got some glitches when at full "key repeat"-rate
return
;;;;;;;;;; Win+P - Takes a screenshot of whats inside the aim window
#P::
filename=%A_Now%.bmp ;just a unique filename
noParams = NONE
GDIplus_Start()
WinGetPos , X_cap, Y_cap, W_cap, H_cap, AimFrame
GDIplus_CaptureScreenRectangle(bitmap, X_cap, Y_cap, W_cap, H_cap)
GDIplus_GetEncoderCLSID(bmpEncoder, #GDIplus_mimeType_BMP)
GDIplus_SaveImage(bitmap, filename, bmpEncoder, noParams)
GDIplus_DisposeImage(bitmap)
GDIplus_Stop()
return
;;;;;;;;;; Ctrl+Arrows - Moves the aim window 1 pixel at the time ;;;;;;;;;;
^Up::MouseMove, 0, -1, 0, R
^Down::MouseMove, 0, 1, 0, R
^Left::MouseMove, -1, 0, 0, R
^Right::MouseMove, 1, 0, 0, R
;;;;;;;;;; Shift+Arrows Change Size of aim window ;;;;;;;;;;
+Right::
if (zoom*(aimW+1) < A_ScreenWidth)
aimW+=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom
keywait, right
return
+Left::
if (aimW > 4)
aimW-=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom
keywait, left
return
+Down::
if (zoom*(aimH+1) < (A_ScreenHeight-22))
aimH+=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom
keywait, Down
return
+Up::
if (aimH > 4)
aimH-=1
Gui Show, % "w" aimW*zoom " h" aimH*zoom ,(%aimW%x%aimH%) %zoom%x Zoom
keywait, Up
return
;########## Functions ##########
;;;;;;;;;; Draws the Crosshairs ;;;;;;;;;;
DrawCross( X_CL , Y_CL, Z_CL, dc )
{
;specify the style, thickness and color of the cross lines
h_pen := DllCall( "gdi32.dll\CreatePen", "int", 0, "int", 1, "uint", 0x0000FF)
;select the correct pen into DC
DllCall( "gdi32.dll\SelectObject", "uint", dc, "uint", h_pen )
;draw horizontal lines
DllCall( "gdi32.dll\MoveToEx", "uint", dc, "int", 0, "int",floor((Y_CL-1)/2)*Z_CL , "uint", 0)
DllCall( "gdi32.dll\LineTo", "uint", dc, "int", X_CL*Z_CL, "int", floor((Y_CL-1)/2)*Z_CL)
DllCall( "gdi32.dll\MoveToEx", "uint", dc, "int", 0, "int",floor((Y_CL-1)/2)*Z_CL+Z_CL , "uint", 0)
DllCall( "gdi32.dll\LineTo", "uint", dc, "int", X_CL*Z_CL, "int", floor((Y_CL-1)/2)*Z_CL+Z_CL)
;draw vertical lines
DllCall( "gdi32.dll\MoveToEx", "uint", dc, "int",floor((X_CL-1)/2)*Z_CL, "int", 0, "uint", 0)
DllCall( "gdi32.dll\LineTo", "uint", dc, "int", floor((X_CL-1)/2)*Z_CL, "int", Y_CL*Z_CL)
DllCall( "gdi32.dll\MoveToEx", "uint", dc, "int",floor((X_CL-1)/2)*Z_CL+Z_CL, "int", 0, "uint", 0)
DllCall( "gdi32.dll\LineTo", "uint", dc, "int", floor((X_CL-1)/2)*Z_CL+Z_CL, "int", Y_CL*Z_CL)
}
;;;;;;;;;; Select Compare ;;;;;;;;;;
In(x,a,b) { ; closest number to x in [a,b]
IfLess x,%a%, Return a
IfLess b,%x%, Return b
Return x
}
Look inside the code to find all the hotkeys......
Open for suggestions for better solutions....
really want some input on how to optimize the code....
And again credit to all those that wrote the code in the first place.... this is just another version of their work.
Please report bugs (and solution if u found one)
///Ricke