autocomplex Posted August 20, 2007 Share Posted August 20, 2007 I'm trying variotins of this ... If $Trigger = PixelSearch ( 945, 460, 20, 20, $TriggerColor) Then ;Do Stuff EndIf To find a User defined color in a small area, and if it there to make several MouseMoves and MouseClicks. But it is only supposed to start when the user defined color is found. Please Help =) Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
Gif Posted August 20, 2007 Share Posted August 20, 2007 $Trigger = PixelSearch ( 945, 460, 20, 20, $TriggerColor) If Not @error then ;Do mouseclicks and mousemoves EndIf Link to comment Share on other sites More sharing options...
autocomplex Posted August 20, 2007 Author Share Posted August 20, 2007 im still getting an error saying variable undeclared ... Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
autocomplex Posted August 20, 2007 Author Share Posted August 20, 2007 This is the bit of code im working on ... expandcollapse popup$Trigger = PixelSearch( 945, 460, 20, 20, $DropColor) If Not @error then ;Wield Pickaxe in #1 Inventory Slot MouseMove( 835, 370) MouseClick("left", 835, 370) ;Wield Pickaxe in #2 Inventory Slot MouseMove( 880, 370) MouseClick( "left" , 880, 370 ) ;Wield Pickaxe in #3 Inventory Slot MouseMove( 925, 370) MouseClick( "left" , 925, 370 ) ;Wield Pickaxe in #4 Inventory Slot MouseMove( 970, 370) MouseClick( "left" , 970, 370 ) ;drop #5 inventory spot MouseMove( 835, 475) MouseClick("right", 835, 475) MouseMove( 835, 520) MouseClick( "left" , 835, 520) ;drop #6 inventory spot MouseMove( 880, 475) MouseClick("right", 880, 475) MouseMove( 880, 520) MouseClick( "left" , 880, 520) ;drop #7 inventory spot MouseMove( 925, 475) MouseClick("right", 925, 475) MouseMove( 925, 520) MouseClick( "left" , 925, 520) ;drop #8 inventory spot MouseMove( 970, 475) MouseClick("right", 970, 475) MouseMove( 970, 520) MouseClick( "left" , 970, 520) Endif This is the error i get when i try to run it ... Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
Gif Posted August 20, 2007 Share Posted August 20, 2007 yes the variable is undeclared, you want it user defined then a user must specify it.. eh something like:expandcollapse popupGlobal $DropColor #include <Misc.au3> $DropColor = _ChooseColor(1) If Not @error then $Trigger = PixelSearch( 945, 460, 20, 20, $DropColor) If Not @error then ;Wield Pickaxe in #1 Inventory Slot MouseMove( 835, 370) MouseClick("left", 835, 370) ;Wield Pickaxe in #2 Inventory Slot MouseMove( 880, 370) MouseClick( "left" , 880, 370 ) ;Wield Pickaxe in #3 Inventory Slot MouseMove( 925, 370) MouseClick( "left" , 925, 370 ) ;Wield Pickaxe in #4 Inventory Slot MouseMove( 970, 370) MouseClick( "left" , 970, 370 ) ;drop #5 inventory spot MouseMove( 835, 475) MouseClick("right", 835, 475) MouseMove( 835, 520) MouseClick( "left" , 835, 520) ;drop #6 inventory spot MouseMove( 880, 475) MouseClick("right", 880, 475) MouseMove( 880, 520) MouseClick( "left" , 880, 520) ;drop #7 inventory spot MouseMove( 925, 475) MouseClick("right", 925, 475) MouseMove( 925, 520) MouseClick( "left" , 925, 520) ;drop #8 inventory spot MouseMove( 970, 475) MouseClick("right", 970, 475) MouseMove( 970, 520) MouseClick( "left" , 970, 520) Endif EndIf Link to comment Share on other sites More sharing options...
autocomplex Posted August 20, 2007 Author Share Posted August 20, 2007 OK, thats what was wrong i forgot to globalize it ... lol Things seem to be working now, thanks Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! 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