Sign in to follow this  
Followers 0
trung

clean for me

13 posts in this topic

$Coord = PixelSearch(118, 118, 139, 151, 0x4E94FC, 5)

If Not @error Then

MouseDown("left")

endif

$Coord = PixelSearch(117, 117, 139, 151, 0xBC0000, 5)

If Not @error Then

MouseUp("left")

hey guys im trying to get my mouse to click wenever it sees the blue but wen the red comes up it realeast. wen the blue is back it clicks agin and so on

any idea?

mine kinda reacts slow

Share this post


Link to post
Share on other sites



well in that code you don't need to record the search to a variable. That might speed it up a little.

Share this post


Link to post
Share on other sites

can ui explain or fix it for me im really noob

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

not at this long myself, but the variable is the $... that you declare as something

this .... $Coord = PixelSearch(118, 118, 139, 151, 0x4E94FC, 5) .... is declaring $Coord

This is usually done so that you can alter the variable later and the code will understand what you are refering to.

According to his post, you sould drop the variable.

ie,

PixelSearch(118, 118, 139, 151, 0x4E94FC, 5)

will do the same thing unless other parts of your code are setup for $Coord

ex of variable

$x = 1

$x = $x + 1 . . . . now we have made $x = 2

Edited by Hatcheda

Share this post


Link to post
Share on other sites

PixelSearch(118, 118, 139, 151, 0x4E94FC, 5)

If Not @error Then

MouseDown("left")

endif

PixelSearch(117, 117, 139, 151, 0xBC0000, 5)

If Not @error Then

MouseUp("left")

Share this post


Link to post
Share on other sites

$Coord = PixelSearch(118, 118, 139, 151, 0x4E94FC, 5)

If Not @error Then

MouseDown("left")

endif

$Coord = PixelSearch(117, 117, 139, 151, 0xBC0000, 5)

If Not @error Then

MouseUp("left")

hey guys im trying to get my mouse to click wenever it sees the blue but wen the red comes up it realeast. wen the blue is back it clicks agin and so on

any idea?

mine kinda reacts slow

If you are checking a specific spot to see what color the pixel is, use pixelgetcolor. pixelsearch searches the entire specfied area for a color, and then returns the coordinates of the color. if you know where the colors are going to be, and just want to know which one it is at that time, use pixelgetcolor

Share this post


Link to post
Share on other sites

Paulie is right about that.

Anyway if his solution is not good enough for you then make the PixelSearch to look into a smaller area - right now you're searching almost 700 pixels for that color.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

you could also set the priority of the script to high or real time.

Share this post


Link to post
Share on other sites

ahh cmon guys talk to me in english

i said i was noob lol

u guys using big words n junk

can u explain more in details

Share this post


Link to post
Share on other sites

how big is the area you need to search the pixel for? Is it just a background that is changing. Because if it is then you could ony monitor one pixel for the change. That would make the code much faster.

Share this post


Link to post
Share on other sites

Well - I'll add some more ... junk then

Here is the PixelSearch description.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

well ok lemme b more specific. im making a bot for a game called 2moon. its for fishing. the one on here doesnt work so i made my own. we have to hold down the mouse wen theres a blue bar and we let go wen it turns red then click agin wen its blue. can sumone make a quick example for me. even if its a whole enw one

Share this post


Link to post
Share on other sites

Your example is good enough and it will work. Just reduce the search area to make it more accurate and faster.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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