Jump to content

I really need help.. detecting pixel and automatic key press


Recommended Posts

I am a newbie... don't know much about computer language..

IF somebody can help me out here... i would greatly appreciate it...

I just want it for gaming... automatic heal

1. set a color for a pixel. detects when that pixel changes to that color

2. automatically press a button

3. 0.3 sec delay

4. repeat everytime pixel changes to that color..

i want it to open more than one window screen..

one for health and one for mana...

someone plz... i spent so much time trying to get this to work with macro program...

nothing worked out for me...

Link to comment
Share on other sites

... someone plz... i spent so much time trying to get this to work with macro program...

nothing worked out for me...

The game might be blocking your attempts at automation.

Please try something very basic to test that before spending anymore of your time on this:

Sleep(5000)

Send("{ENTER}")

start that two line script

manually activate the game window of interest

wait and see of the "enter" has any effect on the game

If it does not, then consider playing the game that as a human :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Thank you so much

it workd as i wanted!

I have one more question.

that code will detect change of one pixel.

how do you make it a range instead of a pixel.

for example, detecting a colour in a certain rectangle of the screen

and pressing the button

Thank you so much in advance

p.s I no nothing about computer language, however i learned a lot from looking at the code

i want to learn it. but there seem to be many diff kind. which should i learn first?

Link to comment
Share on other sites

Thank you so much

it workd as i wanted!

I have one more question.

that code will detect change of one pixel.

how do you make it a range instead of a pixel.

for example, detecting a colour in a certain rectangle of the screen

and pressing the button

Thank you so much in advance

p.s I no nothing about computer language, however i learned a lot from looking at the code

i want to learn it. but there seem to be many diff kind. which should i learn first?

Open the help file.

Go to the tab named index.

Type in pix.

There are only 4 pixel entries to read and learn about.

PixelSearch is the one that you want:

Searches a rectangle of pixels for the pixel color provided.

For info on how to write a PixelSearch line of code, you should read that page in the help file and if that does not do it, read thru this post and the comments in the code itself:

http://www.autoitscript.com/forum/index.php?showtopic=19722

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...