drakonis Posted June 14, 2009 Share Posted June 14, 2009 ok so i have this script(its a mob retarget script for a game based on pixel detection)what does it do:-checks constantly for a pixel and if it recognizes an unwanted color on the coors it tabs untill the unwanted pixel changes.#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script.#ce ----------------------------------------------------------------------------; Script Start - Add your code below hereHotKeySet('{f6}','Close')HotKeySet('{f5}','TogglePause')Global $Pause$I_PX = '395' ;Pixels X Coord.$I_PY = '46' ;Pixels Y Coord.$I_PixelColor = '646364' ;Pixel to check While 1 Sleep(1) GetPixel($I_PY,$I_PX,$I_PixelColor) WEndFunc Close() ;Hotkey ESC Exits exit 0EndFuncFunc TogglePause() ;Hotkey F1 Pauses the script $Pause = NOT $Pause While $Pause sleep(1) ToolTip('Pixel Shutdown is "Paused"',0,0) WEnd ToolTip("")EndFuncFunc GetPixel($I_PY,$I_PX,$I_PixelColor);Constantly checks the pixel color$I_PixC = PixelGetColor($I_PX,$I_PY)$I_PixH = Hex($I_PixC, 6)If $I_PixH = $I_PixelColor Thencontrolsend("Archlorc", "", "", "{TAB}")sleep(1)EndIfSleep(1)EndFuncTIME FOR THE MOST NOOBISH QUeSTION IN thE AUTOIT HISTORY!!!- I want the script to TAB when it does NOT find the pixel i wanted untill it appears on the coords. Ive been told its enough to replaceIf $I_PixH = $I_PixelColor ThenwithIf $I_PixH <= $I_PixelColor Thenbut the script just keeps tabbing even when it should not.what should i do /b/? Link to comment Share on other sites More sharing options...
stampy Posted June 14, 2009 Share Posted June 14, 2009 I'm thinking you want If $I_PixH <> $I_PixelColor Then rather than less than or equal. Link to comment Share on other sites More sharing options...
drakonis Posted June 14, 2009 Author Share Posted June 14, 2009 thanks ill try this out right away 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