Big10Inch Posted July 31, 2008 Posted July 31, 2008 (edited) My simple script looks at a pixel and if the color matches the requirement it clicks on it.My script will build a buffer of 100's of look/decide/click actions preventing me from Hotkey pausing/ending the action until that Hotkey press get's it's turn which by the time the buffer of look/decide/click actions can run out, it's way too late, the longer the script runs, the longer it takes to finish the queue of actions.....Is there a way to limit or prevent the buffer from storing action ?Here is the script: HotKeySet( "q", "End" ) ; Identifies Hotkeys usedHotKeySet( "g", "Go" )HotKeySet( "s", "Stop" )$Z = 0 $X = 310 ; Sets up edges of search area$Y = 265Do $Z = 0 ; Loop to enable HotkeysUntil $Z = 1Func Go() ; This function Hotkeys from the letter 'G', gets a pixel color, compares it to a range and cliks if within rangeDo $Spot = ( PixelGetColor( $X, $Y )) ; Gets color of pixel being examined If $Spot > 4680000 And $Spot < 5350000 Then ; Decides if color is within accepted range and if so, clicks on it-- MouseClick( "Left", $X, $Y, 1, 0 ) EndIf $X = $X + 7 ; Generates location of next pixel to be checked If $X > 720 Then $X = 310 $Y = $Y + 8 EndIf If $Y > 505 Then ; Detects the end of the search and triggers flag to exit $Z = 1 EndIfUntil $Z = 1EndFuncFunc Stop() ; This function Hotkeys from the letter 'S', halting the search and resets the search location Do $Z = 0 $X = 310 $Y = 265 Until $Z = 1EndFuncFunc End() ; This function Hotkeys from the letter 'Q' and ends the program ExitEndFunc Edited July 31, 2008 by Big10Inch
TerarinKerowyn Posted July 31, 2008 Posted July 31, 2008 Can you tell us what your script is like? Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah
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