BioBrain
Joined: 13 Feb 2008 Posts: 15 Location: Jakarta-Indonesia
|
Posted: Wed Feb 13, 2008 10:03 pm Post subject: how can I compare image in clipboard? |
|
|
I like using ImageSearch() but I learn it more that it can't search mouse cursor in screen. It said that with A_Cursor we can know what cursor is active but if it's custom mouse cursor and in game it'll tell unknown.
Then I found ScreenCapture by Sean can capture screen with mouse cursor in it. And i'm trying to capture the mouse cursor & save it to clipboard with this code:
| Code: | #Include ScreenCapture.ahk
MouseGetPos, XPos, YPos
X1:=XPos-3
Y1:=YPos-3
X2:=XPos+32
Y2:=YPos+32
Size=%X1%, %Y1%, %X2%, %Y2%
CaptureScreen(Size, True, 0) ; Save to ClipBoard, using ScreenCapture.ahk
; some xtra to look if it's capture like I wanted
FileName=%A_MyDocuments%\Screen.bmp
Convert(0, FileName) ; using ScreenCapture.ahk
Gui, Add, Picture,, %FileName%
Gui, Add, Button, Default, OK
Gui,Show
Return
ButtonOK:
Gui,Destroy
Return
|
But know how can I compare the image in ClipBoard with the image I want like ImageSearch() without saving it to file first then show it at GUI and use ImageSearch(). Tx b4. |
|