Need Help True Begginer here

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
hebell
Newbie
Posts: 2
Joined: Wed Jan 13, 2016 4:45 pm

Need Help True Begginer here

Post by hebell » Wed Jan 13, 2016 4:55 pm

Hi there, first timer here, gladly apriciate if someone willing to teach me, read all those guide and yet see no light,
so i post here asking someone kindness to guide me to light :)
http://i.imgur.com/CCrLCqH.png
this the one macro should be (though its from android macro recording app)

everything done smoothly until there is if.imagecount from the picture i uploaded, i dont know how to write it on macro scheduler program, thx

Code: Select all

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
//Wait for 
WaitScreenImage>C:\Users\liner\Documents\Macro Scheduler 14\start1.bmp,0.7,CCOEFF

//Find and Left Click Center of 
FindImagePos>C:\Users\liner\Documents\Macro Scheduler 14\start1.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
Endif

//Wait for 
WaitScreenImage>C:\Users\liner\Documents\Macro Scheduler 14\reward.bmp,0.7,CCOEFF

//Find and Left Click Center of 
FindImagePos>C:\Users\liner\Documents\Macro Scheduler 14\reward.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
Endif

//Wait for 
WaitScreenImage>C:\Users\liner\Documents\Macro Scheduler 14\chess.bmp,0.7,CCOEFF


//Find and Left Click Center of 
FindImagePos>C:\Users\liner\Documents\Macro Scheduler 14\chess.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
Endif

FindImagePos>C:\Users\liner\Documents\Macro Scheduler 14\get.bmp,SCREEN,5,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>C:\Users\liner\Documents\Macro Scheduler 14\ganteng\image_8.bmp,0.7,CCOEFF
  If>Image2Found>0
    MouseMove>Image2_X_0,Image2_Y_0
    LClick
  Endif
Endif


Sobysky
Newbie
Posts: 5
Joined: Mon Dec 07, 2015 11:51 pm

Re: Need Help True Begginer here

Post by Sobysky » Thu Jan 14, 2016 1:24 pm

Hello this is SWfan123.

If you want the program to find first image and click on image 2 it needs to look like this.

Code: Select all

//Find FIRST image
FindImagePos>%BMP_DIR%\image_36.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\image_18.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
  Endif
Endif

Sobysky
Newbie
Posts: 5
Joined: Mon Dec 07, 2015 11:51 pm

Re: Need Help True Begginer here

Post by Sobysky » Thu Jan 14, 2016 1:37 pm

This is what my DB10 macro looks like. It works similar to the macro pic you posted. Only it does not revive or top up energy. You do have to give it a few secs to find the image. for unknown scrolls ect. you can probably make it so that it will just find "get" to make it easier for you.

Code: Select all

Label>WaitForAnImage

//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\start.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\reward.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\chess.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\4starlegendary.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\4starpurple.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\4starblue.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\5starblue.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\5starpurple.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\5starlegendary.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\6starlegendary.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\6starpurple.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\6starblue.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\yes.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\unknown scroll.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\rainbowmon.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\shapeshiftstone.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find FIRST image
FindImagePos>%BMP_DIR%\summoning stone.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif

//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\replay.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

If>FoundAnImage=FALSE
  //Neither image was found, loop back and look again
  Wait>0.2
  Goto>WaitForAnImage
Endif

Label>WaitForAnImage
  // do something here
Goto>WaitForAnImage

hebell
Newbie
Posts: 2
Joined: Wed Jan 13, 2016 4:45 pm

Re: Need Help True Begginer here

Post by hebell » Sun Jan 17, 2016 1:58 am

hi bro,thx for the code,its enlight me alot :) i'll try it and inform u the result :)

Ch0ch1ik
Newbie
Posts: 5
Joined: Tue Aug 09, 2016 12:19 pm

Re: Need Help True Begginer here

Post by Ch0ch1ik » Tue Aug 09, 2016 12:26 pm

Could you please show me an example, which part of runes you use as bmp to find?
Im trying to make it work + add refill option but got problem with runes recognition - macro don't find image or click other place (guess it's multiple find). Tried many tolerance options - f.g. 0.7, 0.9, 1, 10, 50, 100, exact, etc. but it's not working properly :(

Code: Select all

Label>WaitForAnImage
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\start.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
wait>0.1
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\reward.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  wait>2
  Lclick
  Let>FoundAnImage=TRUE
Endif

wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\4starlegendary.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
  Endif
  
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\4starpurple.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT        //GIT
If>NumFound>0
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
  Endif
  
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\4starblue.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
//Find and Left Click Center of 
FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
  Endif

wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\5starblue.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
  Endif
  
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\5starpurple.bmp,SCREEN,.99,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
   FindImagePos>%BMP_DIR%\sell.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
  Endif

wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\5starlegendary.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\6starlegendary.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\6starpurple.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\6starblue.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT         //GIT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\get.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\yes.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\unknown scroll.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\rainbowmon.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\shapeshiftstone.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find FIRST image
FindImagePos>%BMP_DIR%\summoning stone.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  //If FIRST image found, get position of image TWO and click on THAT
  FindImagePos>%BMP_DIR%\ok.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
  If>Image2Found>0
    MouseMove>XArr_0,YArr_0
    LClick
    Let>FoundAnImage=TRUE
  Endif
Endif
wait>0.1
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\replay.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif
wait>0.1

//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_1.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick
Endif
wait>0.1
//Find and Do Nothing Center of
FindImagePos>%BMP_DIR%\image_2.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>NumFound>0
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_3.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>Image2Found>0
  MouseMove>XArr_0,YArr_0
  LClick
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_4.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>Image3Found>0
  MouseMove>XArr_0,YArr_0
  LClick
  Let>FoundAnImage=TRUE
Endif

endif

Endif





If>FoundAnImage=FALSE
  //Neither image was found, loop back and look again
  Wait>0.2
  Goto>WaitForAnImage
Endif
Label>WaitForAnImage
  // do something here
Goto>WaitForAnImage

//CCOEFF



preetsagal
Newbie
Posts: 1
Joined: Thu Aug 18, 2016 7:51 am
Location: Bangalore
Contact:

Re: Need Help True Begginer here

Post by preetsagal » Thu Aug 18, 2016 7:58 am

Hello hebell. did code runned correctly? Please reply . i trying for same code.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts