How to create repetition of commad

Hello everyone,

I have a code for analyzing pictures. The main problem is if somebody forgets to click the dialogue box (for step1), it will move to the next step. How can I prevent to move in the next step? Is there any code which will force to click the respected dialogue box to move to the next step?
I’m really confused how to solve this issue

Add a waitForUser dialog to the macro workflow, examples:

waitForUser("Title", "Do something, then click OK");

https://imagej.nih.gov/ij/macros/WaitForUserDemo.txt

See also (older documentation):

https://imagejdocu.tudor.lu/plugin/utilities/wait_for_user/start