I need a script that would work like this
when it clicks the left mouse gets pixelgetcolor 320.240 x y and follow the mouse move after that pixelcolor
please help
pixelgetcolor end move mouse this color
Re: pixelgetcolor end move mouse this color
zliyr, please
I can do a simple script
but what I need is beyond my skills
I already read it 100x end two days I look google and I can not do it
I can do a simple script
but what I need is beyond my skills
I already read it 100x end two days I look google and I can not do it
Re: pixelgetcolor end move mouse this color
Simplified version of https://autohotkey.com/board/topic/1261 ... eft-click/
If that doesn't work then you are gonna need to try DllCall("mouse_event", uint, 1, int, 100, int, 0)
i'll do more tomorrow, very tired atm
EDIT: you should use https://start.duckduckgo.com/ instead of google, it gives better results imo
Code: Select all
#MaxThreadsPerHotkey, 2
CoordMode, Pixel, Screen
*~LButton::
while GetKeyState("LButton", "P"){
PixelSearch, colourx, coloury, 0, 0, 1920, 1080, 0x4242ff, 0, Fast RGB
IF ErrorLevel = 1
{
sleep, 1000
}
IF ErrorLevel = 0
{
Click, %colourx%, %coloury% Left, 1
sleep, 1000
}
}
return
i'll do more tomorrow, very tired atm
EDIT: you should use https://start.duckduckgo.com/ instead of google, it gives better results imo
Re: pixelgetcolor end move mouse this color
Unfortunately, nothing happens when I run this script
this is to find color pixel
I need pixelgetcolor and follow the cursor with it
this is to find color pixel
I need pixelgetcolor and follow the cursor with it
Re: pixelgetcolor end move mouse this color
Yeah as I said i'll try again tomorrow,
I think the solution you want is with DllCall("mouse_event", uint, 1, int, 100, int, 0)
exactly how it will work? no idea
I think the solution you want is with DllCall("mouse_event", uint, 1, int, 100, int, 0)
exactly how it will work? no idea
Re: pixelgetcolor end move mouse this color
ok, I will be waiting for you
I only hope that you understand me
I need it first
left mouse click
take pixel color 320.240 x y
then the mouse cursor has to go with this pixel color
I only hope that you understand me
I need it first
left mouse click
take pixel color 320.240 x y
then the mouse cursor has to go with this pixel color
Re: pixelgetcolor end move mouse this color
Yeah you need to search for the pixel color, click if its found
then calculate how where the mouse needs to move
then calculate how where the mouse needs to move
Re: pixelgetcolor end move mouse this color
it can not be in code just search for color
because first click the mouse must detect this color
and only later mouse cursor has to follow him
because first click the mouse must detect this color
and only later mouse cursor has to follow him
Re: pixelgetcolor end move mouse this color
see this script when we click the button gets pixelcolor all 120,000 colors
sens:=10
delz:=10
holdtiem:=400
crossset:=1
;color split
SplitRGBColor(RGBColor, ByRef Red, ByRef Green, ByRef Blue)
{
Red := RGBColor >> 16 & 0xFF
Green := RGBColor >> 8 & 0xFF
Blue := RGBColor & 0xFF
}
SplitBGRColor(BGRColor, ByRef Red, ByRef Green, ByRef Blue)
{
Red := BGRColor & 0xFF
Green := BGRColor >> 8 & 0xFF
Blue := BGRColor >> 16 & 0xFF
}
;Menu loop
loop
{
GetKeyState, state, F10
if state = D
{
SoundPlay, %A_ScriptDir%\8.mp3
sleep 2000
ExitApp
}
GetKeyState, state, F11
if state = D
{
trigger:=false
}
GetKeyState, state, Insert
if state = D
{
trigger:=true
}
;Beta trigger
if !GetKeyState("XButton2") && trigger==true
{
sleep 50
MouseGetPos, oneX, oneY
PixelGetColor, colorone, oneX+crossset, oneY+crossset
SplitRGBColor(colorone, oneRed, oneGreen, oneBlue)
}
if GetKeyState("XButton2") && trigger==true
{
sleep 1
MouseGetPos, twoX, twoY
PixelGetColor, colortwo, twoX+crossset, twoY+crossset
SplitRGBColor(colortwo, twoRed, twoGreen, twoBlue)
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
sleep delz
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
}
}
sens:=10
delz:=10
holdtiem:=400
crossset:=1
;color split
SplitRGBColor(RGBColor, ByRef Red, ByRef Green, ByRef Blue)
{
Red := RGBColor >> 16 & 0xFF
Green := RGBColor >> 8 & 0xFF
Blue := RGBColor & 0xFF
}
SplitBGRColor(BGRColor, ByRef Red, ByRef Green, ByRef Blue)
{
Red := BGRColor & 0xFF
Green := BGRColor >> 8 & 0xFF
Blue := BGRColor >> 16 & 0xFF
}
;Menu loop
loop
{
GetKeyState, state, F10
if state = D
{
SoundPlay, %A_ScriptDir%\8.mp3
sleep 2000
ExitApp
}
GetKeyState, state, F11
if state = D
{
trigger:=false
}
GetKeyState, state, Insert
if state = D
{
trigger:=true
}
;Beta trigger
if !GetKeyState("XButton2") && trigger==true
{
sleep 50
MouseGetPos, oneX, oneY
PixelGetColor, colorone, oneX+crossset, oneY+crossset
SplitRGBColor(colorone, oneRed, oneGreen, oneBlue)
}
if GetKeyState("XButton2") && trigger==true
{
sleep 1
MouseGetPos, twoX, twoY
PixelGetColor, colortwo, twoX+crossset, twoY+crossset
SplitRGBColor(colortwo, twoRed, twoGreen, twoBlue)
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
sleep delz
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
}
}
Who is online
Users browsing this forum: Rohwedder and 150 guests