Skrajunas Posted April 6, 2009 Share Posted April 6, 2009 Hello all. I'm new here, but enough of that.As topic says, I'm trying to make a bot for JamLegend. I don't know if I'm allowed to post links to other websites, so I won't. You can easily find it on google.What is this game about? Its like "Guitar hero" or "Frets on Fire" online.Where I get stuck?Basically... Everywhere. I'm totally new to AutoIt, so... I think this is the big problem.My first language is not english, so some functions or variables names can be strange to you.So, this is my code:#include <Color.au3> Func Tikrinam1($xx1,$yy1) ; My base function. It does all the work $pikselis1 = PixelGetColor($xx1,$yy1) $hexas1 = Hex($pikselis1, 6) $hh1 = '0x' & $hexas1 $colorget1 = _ColorGetRed($hexas1) $safetyCheck = 0 if $colorget1 = 0 And $safetyCheck = 0 Then ;if red is 255 and the key is not pressed, then press the key $safetyCheck = 1 Sleep(75) Send("{1 down}") Sleep(30) Else $safetyCheck = 0 Send("{1 up}") EndIf EndFunc $X1 = 672 $Y = 491 While 1=1 Tikrinam1($X1,$Y) WEndBasically, this is my plan of making bot:* Get Color of the pixel* When it changes color (i.e. to red), press the key* When the color comes back to normal, unpress the key* Do the same with three to five keys.The main window, where I need to press keys looks like this:At this point, my script checks only for one (the first line) pixel, and for one color. THe base problem is, that when script is working, and I press other keys (i.e. "2", "3", and others) they just stuck! I have to press them two-four times repeatedly, to make them unpressed.What I am doing wrong? Could someone give me some code examples how should I do it? Or am I doing it all wrong, and should scrap and remake it?Your help is really appreciated. Link to comment Share on other sites More sharing options...
Skrajunas Posted April 7, 2009 Author Share Posted April 7, 2009 Bump. No one can help me?.. If something is wrong, ask me, if I can, I will tell more about my problem. Link to comment Share on other sites More sharing options...
eogra7 Posted July 7, 2009 Share Posted July 7, 2009 assuming the code is Visual Basic/Studio, i may be able to help with the sendkeys.send/sendwait section. if you can screenshot twaht you what the form to look like, and the pixelgetcolor commands filled in, i think i can get this working. feel free to contact me via email (runescapetechman@hotmail.com) or on MSN if you wish. i know the basics of visual basic and a little bit of advanced coding. ~3\/@|\/ Link to comment Share on other sites More sharing options...
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