New To Macros

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Phamous
Newbie
Posts: 2
Joined: Thu Sep 13, 2018 5:14 am

New To Macros

Post by Phamous » Thu Sep 13, 2018 5:18 am

Ok So i have some experience in coding, however i don't quite understand how the macro is suppose to link the commands together. I have some issues with the if/then statements every time i attempt to apply the code to the code i already have it doesn't want to work and spits out errors. I am still learning to code as well so could prolly be most of it lol.

So i wrote out my plan for the macro i am attempting to write, and would like to improve on it once i get it to semi working order.

Layout for Macro

Set focus Window
Find Mining Material
Hold Shift + Left Click
Wait 3 Sec
Repeat Until Chat is found You have found Gold or You have found Silver
If Gold move to 2nd Position Left Click Then Repeat Original Task
If Silver Move to first position Left Click then Repeat Original Task

Here Is my current macro code

//Set focus
SetFocus>Psycho Phamous - Astonia Reborn v3.6.0
Wait>0.5

//Find Mining Material
//Hold Shift + Left Click on Material
Press Shift
MouseMoveRel>362,268
Release Shift
Press Shift
LClick
Release Shift
//Wait 3 Seconds
Wait 3

// IF Golem appears wait 10 seconds if not Repeat

//Repeat Until Chat is found You have found Gold or You have found Silver

//If Gold move to 2nd Position Left Click Then Repeat Original Task

//If Silver Move to first position Left Click then Repeat Original Task

Phamous
Newbie
Posts: 2
Joined: Thu Sep 13, 2018 5:14 am

Re: New To Macros

Post by Phamous » Thu Sep 13, 2018 5:20 am

while attempting to set up the if then statement i need to implement image recognition and text recognition in the if than statement in order to get the code to work properly and place the item/drop in the corresponding area.
I dont expect people to do the work for me but if they can explain or show a tutorial on how to implement these into the code i would appreciate the help!

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: New To Macros

Post by Marcus Tettmar » Mon Sep 17, 2018 11:44 am

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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