Starship Posted July 21, 2011 Posted July 21, 2011 All I want is a simple bot with a few delays.I want a bot that starts when the required pixel changes, presses the up key after a sleep delay set by the user in the program, and there's 5 of these delays.Really simple, however I cannot find a tutorial, or even any code samples.I want a hotkey to activate the bot, and when the required pixel changes (colour) the delay starts from there.Here's an example: Users able to enter their own sleep times as everyone is different.Someone please assist me or even code it for me if you're that nice.
smartee Posted July 21, 2011 Posted July 21, 2011 Hi and Welcome to the forums!!Please read the Forum Rules and then drop the subject. Game automation will not be discussed.
Starship Posted July 21, 2011 Author Posted July 21, 2011 (edited) I did not mention anything in this thread about it being for a game... I actually did not say what it was for. I do not want a bot for that game anymore. Can we please stop talking about games now? It's not allowed! Gonna help me or what? If you're not, DON'T POST IN MY THREAD. Please and thank you. I actually reported my thread to a moderator to delete it as I can not delete it myself. Edited July 21, 2011 by Starship
Xandy Posted July 21, 2011 Posted July 21, 2011 (edited) There are alot of ways reading pixel values aids determining what the user sees. For example by reading rect areas from the screen, I can determine if if someone has answered the phone or not with autoit scripts. I use PixelGetColor($xy[0]+$w, $xy[1]+$h). I apply a little bit of self made data storage, read, write, and I bet I could find your face. Edited July 21, 2011 by songersoft Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Starship Posted July 21, 2011 Author Posted July 21, 2011 (edited) There are alot of ways reading pixel values aids determining what the user sees. For example by reading rect areas from the screen, I can determine if if someone has answered the phone or not with autoit scripts. I use PixelGetColor($xy[0]+$w, $xy[1]+$h). I apply a little bit of self made data storage, read, write, and I bet I could find your face. So that would be the following: PixelSearch(113, 232, 122, 259, 2801452, 10) Am I right? What about for the sleep times and up arrow key lol Is that: Sleep(GUICtrlRead($INPUT1) * 1000) Send("{UP}") Sleep(GUICtrlRead($INPUT2) * 1000) Send("{UP}") Sleep(GUICtrlRead($INPUT3) * 1000) Send("{UP}") Sleep(GUICtrlRead($INPUT4) * 1000) Send("{UP}") Sleep(GUICtrlRead($INPUT5) * 1000) Send("{UP}") Sleep(GUICtrlRead($INPUT6) * 1000) STOP() How do I make the GUI though :/ I wish this was more simple... They should make the program like a Visual Basic type thing... So I can actually see if I'm doing it right. Could someone write up an example? I am such a n00b at this. Edited July 21, 2011 by Starship
Xandy Posted July 21, 2011 Posted July 21, 2011 How do I make the GUI though$hgui= guicreate(pixel_width, height) Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Xandy Posted July 21, 2011 Posted July 21, 2011 (edited) Sorry, I wrote poor example above. Here is a better example: #include "guiconstants.au3";this file knows a constant I use #include "misc.au3";because I am calling upon the powers of _ispressed() $hgui= GUICreate("example", 320, 200);make window GUICtrlCreatelabel("user name:", 10, 40);label field $username= "default user" $inputusername= GUICtrlCreateInput($username, 10, 60, 90);input user name guisetstate(@sw_show);show window $done= 0 While $done= 0 $msg= GUIGetMsg() if $msg= $inputusername Then;not a whole lot of use for this input endif if _ispressed("0d") Then;makes sure value is returned when you hit enter $username= GUICtrlRead($inputusername) MsgBox(0, "username= ", $username, 4) while _ispressed("0d");only one at a time folks sleep(50) wend endif if $msg= $GUI_Event_close then $done= 1 wend Edited July 21, 2011 by songersoft Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Moderators SmOke_N Posted July 21, 2011 Moderators Posted July 21, 2011 (edited) Starting a new topic on creating a "bot" whether you mentioned a game or not, just 3 hours after you created a topic on creating a game bot is just ... well ... pretty stupid. Stupid to try and defend even.Reporting your own thread for deletion, so the proof was gone, then calling the board creators stupid because a new user isn't capable of doing specific things, is just ... well ... ignorant.I'd suggest you find something else to use AutoIt with if you want to post on this board again.Any future topics on anything that is deemed inappropriate will result in your posting privileges being permanently removed. Edited July 21, 2011 by SmOke_N 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.
Recommended Posts