Our study presents an accurate and automated control mechanism for Janus micromotors powered by catalytic reactions. This system utilizes fully controllable electromagnetic coils to direct the magnetic field toward a reference point, causing the particles to move in response to the catalytic decomposition of hydrogen peroxide. Magnetic torques without human intervention are applied to the particles, allowing them to align and move precisely. To ensure precise control, we have implemented algorithms that guide the particles to a desired location. In addition, a desired trajectory made up of multiple such points enables the active particles to move along more general and complex trajectories.Graphical abstract: