Hello!, i have a question please. Im trying to automate a macro execution, i have tried excel activities but it seems that errors will appear eventually (i got system.object type of errors and i have seen in the forum people complaining about this errors), so i have decided to run the macro without excel activities.
SendHotkey to call Run Comand
Type into to open excel
SendHotkey again to call a macro
Detect when a macro is finished, it has a message box (THIS IS THE QUESTION I HAVE)
The problem is that i want to detect when the macro is finished, sometimes it takes 7 min, 10 min or 15, it depends of the element automated.
I used the ON element appear activity with 900 000 miliseconds of timeout , but i have problems with this.
The settings are:
Timeout: 900 000 milliseconds
Wait for ready: Complete
Repeatforever: False
WaitActive: Check
WaitVisible: Check
You can either use a check app state and set the maximum desired time that you want to wait or use a loop to run for a determined time and use inside it the check app state.
If can also use the element exists if you prefer the classic activities and it works the same way.
If you want to use a loop, the condition must be to wait the result to be true or the iteration to be more times than you wanted (if you use 30 seconds and want to wait 10 minutes, you can set the counter maximum to 20 and in the activity the time must be 30).
Only remember that classic activities use time as miliseconds and modern activities use time as seconds
Thank you very much @uKisuke and @Anil_G. Indeed, i am new in UiPath and i am using old activities that i have watched in tutorials, I will try the modern activities and come back with a feedback.
I have tried the suggestion propossed and the process runs the macro but it doesnt find the button of the message box that appears when finishing the macro.
In the image below is the subprocess (N.1 and N.2). N.3 Shows the button selection and N4. The error.
It is used to clean and order large data in multiple sheets, so the screen keeps updating
After the data is cleaned it opens other excel file to load the data to a master table and close the file.
The message box appears in the first file where the macro runs (not the master excel file).
Any suggestion how to run a large and complex macro without problems and also i would like to run it by a bot. Thank you
The problem is that i need to add another activity after the macro is finished, and ui path tells me it doesnt find the interface, so the message box was the indicator for finishing the macro