|
Ok this is what I have done so far. It works but just not like I had hoped. I don't believe there is much more I can do to make it work with the apps that I am trying. But it is flawless when using it in paint.
F1::
{
IniFile := "C:\Users\Jesse\Desktop\location.txt"
FileGetSize, size, %IniFile%
if (size = "") {
MsgBox Setting up
IniWrite, %color%, %IniFile%, location, color
} else {
IniRead, %color%, %IniFile%, location, color
}
CoordMode, Pixel
Return
}
F2::
{
MouseGetPos, x, y
PixelGetColor,color, %x%, %y%
IniWrite, %color%, %IniFile%, location, color
Return
}
~F3::
MouseGetPos, begin_x, begin_y
while GetKeyState("F3")
{
MouseGetPos, x1, y1
PixelSearch, Px, Py, 803, 524, 803, 524, %color%, 0, Fast
MouseMove, Px, Py, 0 ;0 is mouse speed, 0 is instant
}
Return
f1: creates ini file if there isn't one.
f2: selects the pixel to lock to.
Hold f3: goes to the pixel and stays on it until you let off.
I was hoping to use it in some simple flash games etc. as a means of aiming. It was a good beginner project but I just don't think PixelSearch can process it.
If you have any suggestions let me know.
|
|