Sign in to follow this  
Followers 0
Charger

Pixel Search

21 posts in this topic

#1 ·  Posted (edited)

Hello all,

I have read all the help file's on pixel search, but it was not all that helpful.

I have also searched the forums I read like 12 posts and none of them helped me.

You would think that pixel search would have like a 6 page tutorial, being its used in just about every bot...

Ok heres my question's:

I need to know how to set it up to wait for a pixel to enter the screen, then run the rest of the scripted?

I think it has something to do with PixelChecksum But like I put in my opening post, the help file on pixel search is not detailed.

I also need to know what auto it would do if more then 1 color entered the screen?

Thanks for the help :think: ,

-Charger

Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites



Ok heres my question's:

I need to know how to set it up to wait for a pixel to enter the screen, then run the rest of the scripted?

I think it has something to do with PixelChecksum But like I put in my opening post, the help file on pixel search is not detailed.

I dont totally understand your question. If you want to wait for a pixel of a particular color to show up on the screen and then perform the rest of your script then you could do something like:

While 1
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x000000); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
    ; Rest of your script goes here
        ExitLoop
    EndIf
WEnd
Exit

If you want to see if ANY pixel changes the screen, then yes.. you could use pixelchecksum:

$checksum = PixelChecksum(0,0,@DesktopWidth, @DesktopHeight)

While $checksum = PixelChecksum(0,0,@DesktopWidth, @DesktopHeight); note, pixelchecksumming the entire screen is slow
    Sleep(10)
WEnd
;Rest of code goes here, something on the screen has changed

Simucal -


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

#3 ·  Posted (edited)

Is the pixel in a fixed place? Then you use PixelGetColor()

Opt('PixelCoordMode', 2); Using Client Coords <<
Global $Window = 'Game Window Title', $ColorWanted = 0xFF0000
If Not WinActive($Window) Then WinActivate($Window); window must have focus for pixel functions to work.

If PixelGetColor($x, $y) <> $ColorWanted Then
    Do
        Sleep(10)
        If Not WinActive($Window) Then WinActivate($Window)
    Until (PixelGetColor($x, $y) == $ColorWanted); loop until color found
EndIf

While 1
  ;Do Something
WEnd

If it's somewhere on your screen but you don't know where, then you'll need to use PixelSearch()

Opt('PixelCoordMode', 2)
Global $Window = 'Game Window Title', $Color = 0xFF0000
If Not WinActive($Window) Then WinActivate($Window)

$WinSize = WinGetPos($Window)
If IsArray($WinSize) Then
    $Psearch = PixelSearch(0, 0, $Window[2], $Window[3], $Color)
    If @error Then
        Do
            Sleep(10)
            $Psearch = PixelSearch(0, 0, $Window[0], $Window[1], $Color)
        Until IsArray($Psearch); loop until color is found (returns an array)
    EndIf
EndIf

While 1
;Do Script here
WEnd

Edit:

Too slow lol.

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

Ah, Smoke.. your examples were much more detailed :think:


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)

Yes im think thats what I need. Now lets go see if I can put it into use.

Thanks you two, both your posts helped...

Love the ava, smart thinking replacing the call button with a autoit logo,

-Charger

Now I just need question 2 answered

Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

Yes im think thats what I need. Now lets go see if I can put it into use.

Thanks you two, both your posts helped...

Love the ava, smart thinking replacing the call button with a autoit logo,

-Charger

Now I just need question 2 answered

Question 2 was answered really... You're only looking for 1 color, so a 2nd color wouldn't matter.

[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

#7 ·  Posted (edited)

No because that 1 color is going to be on the page times 3.

It did not work right any way, here all give you the full code:

(first try with mouse clicker)

Func _RunGW2()
   Run("C:\Program Files\Guild Wars\Gw.exe")
   WinWaitActive("Guild Wars")
   Sleep(2000)
   Send("{tab}")
   Send("chargerracing@gmail.com")
   Send("{tab}")
   Sleep(100)
   Send("*********")
   Send("{enter}")
   Send("{left}")
   MouseClick("left", 1025, 769, 0)
EndFunc

It did not work, for some reason it gos over to the cumputers clock.

Then I tryed using the pixel thing and I could not get it to work, I think it the way I put it:

Func _RunGW()
   Run("C:\Program Files\Guild Wars\Gw.exe")
   WinWaitActive("Guild Wars")
   Sleep(2000)
   Send("{tab}")
   Send("chargerracing@gmail.com")
   Send("{tab}")
   Sleep(100)
   Send("*********")
   Send("{enter}")
   Sleep(5000)
    $coord = PixelSearch( 1023, 767, 1025, 769, 0xD7E4F4 )
    If IsArray($coord) = 1 Then
EndFunc

I think the reason why it did not work is becasue I need it to click, I also need to find a way to make it click left in a loop till the color come up.

Im sure I look really dump right about now, but hay im learning, no1 would pick this up on there first week.

-charger

Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

Im sure I look really dump right about now, but hay im learning, no1 would pick this up on there first week.

-charger

You've been a member since September?

You might want to take a look at Valuaters Bot maker in the scripts and scraps forum.


[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

#9 ·  Posted (edited)

You've been a member since September?

You might want to take a look at Valuaters Bot maker in the scripts and scraps forum.

Yes I have, but when I joined befor it was to download a scripted and ask a question about it.

Then I tryed learn a bit back but got really busy, now that I got free time I would really love to learn....

Ill take a look at it and see if it helps, thanks...

Any1 else want to try and help me?

-Charger

Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

Yes I have, but when I joined befor it was to download a scripted and ask a question about it.

Then I tryed learn a bit back but got really busy, now that I got free time I would really love to learn....

Ill take a look at it and see if it helps, thanks...

Any1 else want to try and help me?

-Charger

You need to comprehend what your doing with the code as well as how to use the functions: http://www.autoitscript.com/forum/index.php?showtopic=21048

[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

Well I already download autoit 1-2-3, I found it to be cool, but I got to the gui test and almost all the questions got cut off, and I can give the test a try unless I know whats being asked of me...

I just got your EnCodIt, nice work....

Um and I search for "Valuaters Bot Maker" and came up with nothing.

What should I be searching for? Or can you post a link please?

Thanks,

-Charger


Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

Well I already download autoit 1-2-3, I found it to be cool, but I got to the gui test and almost all the questions got cut off, and I can give the test a try unless I know whats being asked of me...

I just got your EnCodIt, nice work....

Um and I search for "Valuaters Bot Maker" and came up with nothing.

What should I be searching for? Or can you post a link please?

Thanks,

-Charger

Well I don't know about the 123 issue, you should probably tell Valuater about that.

But...

This is what I did to find it:

1. Search

2. Advanced Mode

3. Members Name - Valuater

4. Search Where - Scripts and Scraps

5. Search Titles Only

6. Perform Search

And it was like 4 down: http://www.autoitscript.com/forum/index.ph...opic=22245&st=0


[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

The aimbot example in my signature might provide you with something to go on as well.


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

Yes it does help, but I really need to learjn what each func does befor I get the hang of it, and being im reading script's that have been premade by some1 else, they are some what hard to follow. And being that that tag's only have so much detail, well im going to go read the scripted and look them up in the help file....

Lets see if I can learn what I need to know off of them thanks you two....

-Charger


Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

Thats how I learn. Take a script that is beyond my current skill level, look up the syntax and help file entry for each function that I do not know already and piece together how the script works.


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

#16 ·  Posted (edited)

I learned html like this lol, only this is 10 times hard, because some things I cant find in help file.

Maybe you could give me a hand, it seems you have the hole pixel thing down.

Heres the specs of the pixel search:

PixelSearch(118, 181, 765, 503, 0x49496D)

I need it to loop on that... and click on that color every time it enters the screen...

P.s.>when I was using your bot on Camper Strike, I saw that the game has a built in stopper, you should set it up to take head shots and body shots loop in and out of the 2. Also you could make some shots hit the ring arounf the red dot, that way the game will not know your using a bot.....

It sound easy when you word it out, but its always 10 times hard then you think... Wow did I learn that one fast lol...

-Charger

And also if your willing to, you could give me a msn so we can chat, help me get this down.... But if you dont want to its cool......

<Edit>

Woot I got it to work.

As long as I can kill the monster in under 5 secs it work......But even if it dont cill it in 4 sec it will re-click in 38 secs lol....

While 1
    $coord = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0x49496D)
            If IsArray($coord) = 1 Then
                MouseMove($coord[0], $coord[1], 0)
                MouseClick("left")
                Sleep("38000")
        ;X: 118 Y: 181  W: 765  H: 503
        ;118, 181, 765, 503
            endif
WEnd
Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Feels good to figure something out eh? :think:

A suggestion:

Change this:

MouseMove($coord[0], $coord[1], 0)
                MouseClick("left")
To This:
MouseClick('left', $coord[0], $coord[1], 0)

Also if you need it done in 5 secs and you don't want to sleep 38 seconds before it tries again, you can try this:

While 1
    Local $PixTimer = TimerInit(); Start Timer
    $coord = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0x49496D)
    If IsArray($coord) And (TimerDiff($PixTimer) / 1000) <= 5 Then
        MouseClick('left', $coord[0], $coord[1], 0)
        Sleep(38000)
    EndIf
WEnd
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

#18 ·  Posted (edited)

Is there a way to make it click when the color comes up, because as I had it without the mouse click it just follows the color?

Is that first code going to make it click when the color comes up?

And I dont get what the 2ed code does?...

Sorry I had like 19 beers a friend lost his job so we all got drunk :think: .

All I tryed puting in a pause/esc button, for some reason I cant get it to work:

(am I doing anything wrong?)

HotKeySet("{Space}", "TogglePause")

HotKeySet("{Esc}", "Terminate")

-Charger

<Edit>

Aww, and now that I think about it it does feel good, having a scripted work just like I wanted it to... :(

Other then the hole clicking thing...

<Edit2>

I put your first code in and it stoped working lol.....

Im going to give your 2ed code a try and then head out to bed.....

Edited by Charger

Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

The 2ed scripted dont seem to work,

Quote Error report:

line 14 (file"c:\Documents and Settings\hp_administrator\Desktop\Test2.au3")

IfisArray($coord) and (TimerDiff($pixtimer)/1000)

Error: "if" statment must have a "then" keyword.

-Charger


Never forget the power of words, and how it can affect someone’s life.Always remember theres another person on the other side of the computer.

Share this post


Link to post
Share on other sites

The 2ed scripted dont seem to work,

Quote Error report:

line 14 (file"c:\Documents and Settings\hp_administrator\Desktop\Test2.au3")

IfisArray($coord) and (TimerDiff($pixtimer)/1000)

Error: "if" statment must have a "then" keyword.

-Charger

Yours
IfisArray($coord) and (TimerDiff($pixtimer)/1000)

Mine

If IsArray($coord) And (TimerDiff($PixTimer) / 1000) <= 5 Then

See any difference with the If / <= 5 Then ?


[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