demandnothing Posted August 24, 2009 Posted August 24, 2009 this is the code i currently have.. i turned my pixelbot into a simpler trigger bot.. but i still want my pixel bot to work. #include <Misc.au3> HotKeySet("{F5}", "start") HotKeySet("{F6}", "stop") HotKeySet("{F1}", "_exit") Global $color Global $ON = False AutoItSetOption( "MouseCoordMode", 0) While 1 Sleep(5) If $ON = True Then $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x960000, 3, 3) If IsArray($coord) = 1 Then MouseClick("left", "", "", 30, 0) EndIf EndIf WEnd Func start() $ON = True EndFunc Func stop() $ON = False EndFunc Func _exit() Exit EndFunc i've used the code suggested by everyone i've talked to, they say to use If IsArray($coord) = 1 Then MouseMove($coord[0],$coord[1]) MouseClick("left",$coord[0],$coord[1]) i figured this was the reason my pixel bot wont lock onto the pixel, because its being told twice to move the mouse, but when i remove the MouseMove function it still doesnt lock on.. when i get into the game i play, and find the color that i want to lock onto, it not only passes the target pixel, but it flies passed it, and spins uncontrolably. i've tried the AutoItSetOption( "MouseCoordMode", 0), which tells the script to use the coordinates of the active window, and this has stopped my spinning out of control problem, yet still it jumps to the looking up/down position. how can i tell this script that the pixel is a moving object?? im guessing that when it sees the pixel, it tries to put my mouse onto that spot, not knowing that when it moves the mouse, the pixel moves too.. is there a script i can use to follow the array $coord outputs? a code i can use to lock onto the target pixel that the variable $coord detects? im not sure what question to ask specifically as i am a beginner, but im a fast learner so if you would please try to help me i would appreciate it.
WolfWorld Posted August 24, 2009 Posted August 24, 2009 Does your object move? PixelSearch can be very slow. So it may be the delay of it that it look like the mouse passes the object. Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
demandnothing Posted August 24, 2009 Author Posted August 24, 2009 (edited) yes the object moves.. its not the delay of pixelsearch that is the problem.. even tho yea it does have that split second before it reacts.. but when i take out the move mouse commands from the script it works perfect as a trigger bot Edited August 24, 2009 by demandnothing
demandnothing Posted August 26, 2009 Author Posted August 26, 2009 BUMP! its been over 24 hours.. been a couple days at that lol
demandnothing Posted September 3, 2009 Author Posted September 3, 2009 second bump.. nobody know how i would tell my script to follow the array instead of going to its location at the time?
WolfWorld Posted September 3, 2009 Posted September 3, 2009 try different AutoItSetOption( "MouseCoordMode", 0) Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
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