Splitz Posted November 28, 2006 Share Posted November 28, 2006 i have only made probally 2-3 things with autoit, so i was wondering if anyone here could help me out with this, see what i want to do is:see in the 1st image how the life bar is fullnow when it goes down like thisi want autoit to preform an action to send a mouse click or (a packet into the game to click on that area without moving my mouse there?) on this area Link to comment Share on other sites More sharing options...
evilelf Posted November 28, 2006 Share Posted November 28, 2006 (edited) Read in Auto It about Pixel Search. ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf ; Find a pure red pixel or a red pixel within 10 shades variations of pure red $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 ) If Not @error Then Send("1") ; 1 is to heal. EndIf Edited November 28, 2006 by evilelf Link to comment Share on other sites More sharing options...
onestcoder Posted November 28, 2006 Share Posted November 28, 2006 Use your info finder tool that comes with autoit and get pixel colors and locations. Write your code with statments like If some pixel colors are persent then do this and if they are not, do something else. you can look up some of my code I did for FFXI to see a ton of examples. Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 28, 2006 Moderators Share Posted November 28, 2006 To answer your question... look at MouseClickPlus() (doesn't always work) or maybe ClickInControl() ... you'll need to search the forums for it. 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. Link to comment Share on other sites More sharing options...
Splitz Posted November 28, 2006 Author Share Posted November 28, 2006 (edited) so confusing O_o my thing looks like this but i keep getting error's If WinActivate("Diablo II") Then $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 ) If Not @error Then Send("1") ; 1 is to heal. EndIf Edited November 28, 2006 by Fenix` Link to comment Share on other sites More sharing options...
Splitz Posted November 28, 2006 Author Share Posted November 28, 2006 ?_? Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 28, 2006 Share Posted November 28, 2006 I think you are missing an EndIf. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] 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