Sign in to follow this  
Followers 0
phuzE koj

move mouse until text appears on certain pixel

9 posts in this topic

#1 ·  Posted (edited)

Okay, this is a little hard to explain, but here it goes:

Is there a way to:

1. Check the color of pixel 0,0

2. Move the mouse to a certain pixel...say for instance 1024,760

3. Then once on the pixel, to check and see if the color of pixel 0,0 has changed.

4. Then if both are true to Send("{F7}")

Sorry if this question is confusing. I'm a little new to autoit, and I could piece together small parts here and there, but couldn't fit it together.

Would anyone mind showin me what this code might look like if it's not too much trouble?

//thanks in advance

edit: rephrased question.

Edited by phuzE koj

Share this post


Link to post
Share on other sites



Okay, this is a little hard to explain, but here it goes:

Is there a way to:

1. Move the mouse to a certain pixel...say for instance 1024,760

2. Then once on the pixel, to check and see if there is a certain change (or to see if certain text exists; "name" for example) on ...say 0,0

3. Then if both are true to Send("{F7}")

Sorry if this question is confusing. I'm a little new to autoit, and I could piece together small parts here and there, but couldn't fit it together.

Would anyone mind showin me what this code might look like if it's not too much trouble?

//thanks in advance

A pixel can't have text on it, except in a metaphysical "angel on the head of a pin" sense. It takes many pixels to make text. AutoIT can read the color of a single pixel, but can't tell what kind of text, or picture, or icon, or wallpaper that pixel might be part of. It would be easy to move the mouse to x,y and see if the color of that pixel matches the pixel at a,b. But that has nothing to do with text that the pixel may, or may not, be part of.

You'll have to define the problem much better to get any solution. :lmao:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Okay, this is a little hard to explain, but here it goes:

Is there a way to:

1. Check the color of pixel 0,0

2. Move the mouse to a certain pixel...say for instance 1024,760

3. Then once on the pixel, to check and see if the color of pixel 0,0 has changed.

4. Then if both are true to Send("{F7}")

Sorry if this question is confusing. I'm a little new to autoit, and I could piece together small parts here and there, but couldn't fit it together.

Would anyone mind showin me what this code might look like if it's not too much trouble?

//thanks in advance

edit: rephrased question.

Not sure I really understand what you are asking....

$Color_1 = PixelGetColor (0, 0)

$Color_2 = PixelGetColor (1024, 760)

If $Color_1 = $Color_2 Then

MsgBox (0, "Same", "You are golden!")

Else

MsgBox (0, "Different", "Sorry, Charlie")

EndIf

Share this post


Link to post
Share on other sites

Not sure I really understand what you are asking....

$Color_1 = PixelGetColor (0, 0)

$Color_2 = PixelGetColor (1024, 760)

If $Color_1 = $Color_2 Then

MsgBox (0, "Same", "You are golden!")

Else

MsgBox (0, "Different", "Sorry, Charlie")

EndIf

That's nearly what I'm talking about, except I want the mouse cursor to physically move to 1024,760. And THEN after that's complete, to RECHECK 0,0 and see if it's changed. Hopefully that clears things up. Thanks for the reply though.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

$Color_1 = PixelGetColor (0, 0)
$Color_2 = PixelGetColor (1024, 760)
Movemouse(1024,760)
If $Color_1 = $Color_2 Then
MsgBox (0, "Same", "You are golden!")
Else
Movemouse(0,0)
EndIf

just add in a mousemove

yeah i just kinda tossed them in so yeah put it where u want

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

cool, it worked, thanks for the help

btw - it is MouseMove not Movemouse.

Share this post


Link to post
Share on other sites

cool, it worked, thanks for the help

btw - it is MouseMove not Movemouse.

:lol::lmao:o:):king:;)


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

OMG i uh just accidently typed movemouse instead of mousemove i have no idea what i was thinkng

Share this post


Link to post
Share on other sites

OMG i uh just accidently typed movemouse instead of mousemove i have no idea what i was thinkng

No worries!! You probably just read his post:

2. Move the mouse

And had that stuck in your head on what he was wanting to accomplish when you were writing it.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0