Mutalgaettae Posted October 4, 2009 Posted October 4, 2009 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...
TurionAltec Posted October 4, 2009 Posted October 4, 2009 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
herewasplato Posted October 4, 2009 Posted October 4, 2009 ... 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 scriptmanually activate the game window of interestwait and see of the "enter" has any effect on the gameIf it does not, then consider playing the game that as a human :-) [size="1"][font="Arial"].[u].[/u][/font][/size]
Mutalgaettae Posted October 5, 2009 Author Posted October 5, 2009 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?
herewasplato Posted October 5, 2009 Posted October 5, 2009 Thank you so muchit 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 screenand pressing the buttonThank you so much in advancep.s I no nothing about computer language, however i learned a lot from looking at the codei 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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now