Sign in to follow this  
Followers 0
bigassmuffin

Pixel Loopng Help

7 posts in this topic

I have the script:

While 1
$var = Pixelgetcolor(28,59)
If Hex($var) = 0x637131 then
MouseClick("Left", 28, 59, 1)
Sleep(5000)
Continueloop(1)
Endif
Wend

A few problems, instead of doing:

MouseClick("Left", 28, 59, 1)

I want it to, (if corect color is found which is above (

If Hex($var) = 0x637131 then
) then I want the mouse to go to that coordinate...

Also, If it finds that color, and the mouse is at the coordiante, I do NOT want it to loop again, instead I want it to play another function...

lets just say the other function is

Send("F10")

Please Help.

THANKS SO MUCH!

Share this post


Link to post
Share on other sites



You should really take some time and look over the wonderful helpfile that autoit comes with. Just typing in "mouse" you would of found the function you wanted:

MouseMove

As far as it calling a function if it finds that color, what is the problem you are having?

While 1
    $var = PixelGetColor(28, 59)
    If Hex($var) = 0x637131 Then
        MouseMove(28, 59, 0)
        Sleep(5000)
        SomeFunction()
    EndIf
WEnd

Func SomeFunction()
    Send("F10")
EndFunc  ;==>SomeFunction

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

You should really take some time and look over the wonderful helpfile that autoit comes with. Just typing in "mouse" you would of found the function you wanted:

MouseMove

As far as it calling a function if it finds that color, what is the problem you are having?

While 1
    $var = PixelGetColor(28, 59)
    If Hex($var) = 0x637131 Then
        MouseMove(28, 59, 0)
        Sleep(5000)
        SomeFunction()
    EndIf
WEnd

Func SomeFunction()
    Send("F10")
EndFunc ;==>SomeFunction
Ty, this sewems, right, but I need to add one thing, if it does not find the hex color 0x637131, I want it to loop...but if it finds it, I want it to play "SomeFunction()"

Share this post


Link to post
Share on other sites

Ty, this sewems, right, but I need to add one thing, if it does not find the hex color 0x637131, I want it to loop...but if it finds it, I want it to play "SomeFunction()"

This already does this.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I don't know..its not working for me, I keep getting an error message wen i tpye in this function that you supplied for me..

While 1

If (Pixelgetcolor(28,59) == 0x6B7539) Then

While 1

$var = PixelGetColor(28, 59)

If Hex($var) = 0x6B7539 Then

MouseMove(28, 59, 0)

Sleep(5000)

SomeFunction()

EndIf

WEnd

Func SomeFunction()

Send("F10")

EndFunc ;==>SomeFunction

I get this error:

If Hex($var) = 0x6B7539 Then

If ^ ERROR

Error: Incorrect number of parameters in function call.

Edited by bigassmuffin

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I told you earlier today in another post that the call you are doing is incorrect... Look up Hex in the help file, the error shows you that you are missing a parameter. I gave you answer above the

If (PixelGetColor(28, 59) == 0x6B7539) Then
Why are you still insisting on using the failing code too? Just replace:
$var = PixelGetColor(28, 59)
If Hex($var) = 0x6B7539 Then
With
If (PixelGetColor(28, 59) == 0x6B7539) Then
Edit:

Fixed a code tag (Hint you should use those)

Edited by SmOke_N

[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

I told you earlier today in another post that the call you are doing is incorrect... Look up Hex in the help file, the error shows you that you are missing a parameter. I gave you answer above the

If (PixelGetColor(28, 59) == 0x6B7539) Then
Why are you still insisting on using the failing code too? Just replace:
$var = PixelGetColor(28, 59)
If Hex($var) = 0x6B7539 Then
With
If (PixelGetColor(28, 59) == 0x6B7539) Then
Edit:

Fixed a code tag (Hint you should use those)

WORKS GREAT!

thank you

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