Sign in to follow this  
Followers 0
Mutalgaettae

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

5 posts in this topic

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...

Share this post


Link to post
Share on other sites



Do you have any code to start with?

Something like this?

Global $pixel = 16777215 ;Specified in decimal format

While 1
    If PixelGetColor(300,200) = $pixel Then 
        Send("{enter}")
    EndIf
    Sleep(300)
WEnd

Share this post


Link to post
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]

Share this post


Link to post
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?

Share this post


Link to post
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]

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