Sign in to follow this  
Followers 0
t0y

mouse to fallow color?

23 posts in this topic

Alright what i need help on is to get my mouse to fallow a RGB color

but i wasnt sure how to do that

i was thinking but couldnt think of anything with my experence.

any help would be thanked.

Share this post


Link to post
Share on other sites



Did you even try a search for +mouse +color +move or something similar ;) ?

Throw a Pixel* into the search and you should find enough to get you going..:lmao:

Share this post


Link to post
Share on other sites

Did you even try a search for +mouse +color +move or something similar ;) ?

Throw a Pixel* into the search and you should find enough to get you going..:lmao:

if you mean in the forums, yeah i did i couldnt find anything

i just need some help or tell me what i need to do , i can do the rest

thanks.

Share this post


Link to post
Share on other sites

Throw a Pixel* into the search and you should find enough to get you going..;)


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

I looked again , didnt find anything that fallow's color with the mouse.

Share this post


Link to post
Share on other sites

PixelGetColor

--------------------------------------------------------------------------------

Returns a pixel color according to x,y pixel coordinates.

PixelGetColor ( x , y )

PixelSearch

--------------------------------------------------------------------------------

Searches a rectangle of pixels for the pixel color provided.

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

MouseMove

--------------------------------------------------------------------------------

Moves the mouse pointer.

MouseMove ( x, y [, speed] )

fal·low1 /ˈfæloʊ/ Pronunciation Key - Show Spelled Pronunciation[fal-oh] Pronunciation Key - Show IPA Pronunciation

adjective 1. (of land) plowed and left unseeded for a season or more; uncultivated.

2. not in use; inactive: My creative energies have lain fallow this year.

noun 3. land that has undergone plowing and harrowing and has been left unseeded for one or more growing seasons.

verb (used with object) 4. to make (land) fallow for agricultural purposes.

fol·low /ˈfɒloʊ/ Pronunciation Key - Show Spelled Pronunciation[fol-oh] Pronunciation Key - Show IPA Pronunciation

verb (used with object) 1. to come after in sequence, order of time, etc.: The speech follows the dinner.

2. to go or come after; move behind in the same direction: Drive ahead, and I'll follow you.

3. to accept as a guide or leader; accept the authority of or give allegiance to: Many Germans followed Hitler.

4. to conform to, comply with, or act in accordance with; obey: to follow orders; to follow advice.

5. to imitate or copy; use as an exemplar: They follow the latest fads.

6. to move forward along (a road, path, etc.): Follow this road for a mile.

7. to come after as a result or consequence; result from: Reprisals often follow victory.

8. to go after or along with (a person) as companion.

9. to go in pursuit of: to follow an enemy.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Also, searching 'Pixel*' yields exactly what you are asking for. Even some of the titles are uncannily similar to yours.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I looked again , didnt find anything that fallow's color with the mouse.

So out of the 27 pages of result you get form a search like this:

+pixel* +mouse

you did not find anything that you could use to refine your search?

Please read this tutorial and try again.. :evil:

EDIT: Typo.

PS: I don't men to mean. But you know, it's your first post. And you already have an attitude :lmao:

EDIT2: This keyboard just will not keep up with me. And I'm a slow typer ;)

Edited by Uten

Share this post


Link to post
Share on other sites

i understand where you're coming from im just a little frustraded i cant get this to work

i had a idea like this:

if MouseClick_IsPressed Then

PixelSearch(0+5, 0+5, @DesktopWidth-5, @DesktopHeight-5, $Color, 10,1)

EndIf

also its runing in a window of 1024x768

and im @ 1280x1024

so i think the pixelsearch isnt working

and i also think MouseClick_IsPressed is incorrect aswell

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

and i also think MouseClick_IsPressed is incorrect aswell

Proper syntax for that function call would be:

_IsPressed(01)

Edit: Forgot to close my code tag.

Edited by mikehunt114

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

crap , this is what i got

WinWaitActive ("Counter-Strike Source") 
#include <misc.au3>
$color = "0x0000FE"
$color1 = "0x47582D"
While 1
if _IsPressed(01) Then
PixelSearch(0, 0, 1024, 768, $Color, ) 
MouseClick("left", $go[$color] )
if _IsPressed(01) Then
PixelSearch(0, 0, 1024, 768, $Color1, ) 
MouseClick("left", $go[$color1] )
EndIf
EndIf
WEnd

i keep geting a error @ the $go[$color]

is it the pixelsearch or what?

Share this post


Link to post
Share on other sites

i keep geting a error @ the $go[$color]

Well, what is $go[$color]?


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

$color = "0x0000FE"

$color1 = "0x47582D"

i thought it would read off this yeah?

or am i mistaken?

Share this post


Link to post
Share on other sites

How about grabbing the return value from PixelSearch? I think the help file is quite clear on how to do it, don't you?

Return Value

Success: Returns a two-element array of pixel's coordinates. (Array[0]= x, Array[1] = y)

Failure: Sets @error to 1 if color is not found.

Or did you miss somthing n the provided code?

Share this post


Link to post
Share on other sites

How about grabbing the return value from PixelSearch? I think the help file is quite clear on how to do it, don't you?

Or did you miss somthing n the provided code?

unless you ment somthing else , i tryed this

MouseClick("left", $go[0x0000FE] )
if _IsPressed(01) Then
PixelSearch(0, 0, 1024, 768, $Color1, ) 
MouseClick("left", $go[0x47582D] )

Share this post


Link to post
Share on other sites

Or from te help file:

; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf


; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

Share this post


Link to post
Share on other sites

Or from te help file:

; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
I should of addthis the targets move so , its needs to keep up with it

in other words 'needs to fallow the pixel"

Share this post


Link to post
Share on other sites

I should of addthis the targets move so , its needs to keep up with it

in other words 'needs to fallow the pixel"

Thats whats called an algorithm and it is for you to implement. If you did the search you claimed you did ;) And read the search results then you would have found several implementations by now.

Happy hunting, reading and coding.

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