How can permit a user pause a macro based on a specific result that he see on the page?

Altough there is similar questions in this forum, my doubt is about the user choose when to pause the macro.

Suppose that my macro is running in a loop, showing some results to the user.

I would want to permit that the user could stop the execution/pause the macro whith a command based in some results, do some action on that page e send another command to the macro go on the execution in its normal path.

Thanks in advance,

You can do with if else command

Read here

Post a macro code to add details

I’ll try to explain better my doubt.

I have done a macro that run a code in a infinite loop. In each step, three links are open and the macro see in the page opened, if there are some information that would be relevant. If there are, a notification is showed at the page to the user. The macro pauses and after some time execute again.

The main macro call three macros: run_bens, run_oficio, run_penhora. Each one, opens a new page and see if that page has some information. If it has, a notification is send to the user.

I would like to know how can the user send a command to pause the macro only when he resolve that the notification is relevant to him, then, he pause the macro, open the links that the macro found the information, then he edit them. After he ends the edition, the user send na another command to the macro goes on.



The main macro.

The code below is of the macro run_bens, all the others two (run_oficio and run_penhora have similar commands.


Hi I can’t understand what you would like to do, if you explain the work you have to do well I will give you some advice

Thanks again.

  1. the site has a page with a table with several links. In each circle the macro will open all of them and search for a specific information on them.


In each page opened, the macro will search the rows of the table, supose, identify in the the colunm “Confirmado”, rows without any value (empty). In this case, the macro will return four occurrences.


After the first circle ends (after open all the links and verify all the pages), the macro will present the notifications to the user.


After 10 seconds the macro will run this again.

My question is:

Is it possible to the user to give a command only WHEN he want (for example a Ctrl+A) to pause the macro, go into the pages that the macro identified to be updated, edit them, and after give na another command (for example Ctrl+B) to resume the macro execution.

That is, he can view the notifications and do nothing or if he guess that is the correct moment to do the updates. And the macro goes on.


Hi Leonardo

To create a manual pause in macro (you can custom it with if condition) you can use 2 solutions

  1. pause 0 or simple pause, it pause macro, you click rsume and macro continue

  1. prompt command, you input a text and confirm and macro continue

With if you can set in pause macro, and you can resume with a manual resume button of manual input text in input box.

I use these methods for login sites, macro opne input prompt, in my case execute a sound too, I manually add the password and macro continue to work.

Thank you.

1 Like