The macro could be more effiicient by enabling to remove waste of time due to "null while loops" (only to way). ** In the case of the RUN VIA CMD that is asynchronous as it could be necessary to have it synchronous. ** In the case of a web loading page. A "IF WIN LOADED" command could be interessant before continuing the macro.
concerning the RUN VIA CMD ... i though to have an option like in Linux where you can add or not an ampersand & to tell if you want to catch back the hand right now or just after the end of the command. It could be very usefull for the simplicity and readability of the code by avoid tips like (SLEEP 1 + CHECK WINDOWS BEFORE CONTINUING).
for the WINWAIT proposal. In order to use MMM with websites, there is ofen "loading page". You have to wait the end the load in order to access to the full page and to run the automated tasks. In order to avoid a click with 50 seconds parameters to be sure that the page is loaded, it could be a good idea to have a IF WINWAIT (or WINLOADED) THEN CONTINUE command.
Hopping it's clear enough, do not hesitate to contact me for precision.
RUN VIA CMD calls a windows batch shell and runs the command strings it is passed. All control of the batch shell is handled by the Windows system and not by MMM. To interact with the windows system MMM needs to do things based on the environmental queues it can access. Such as WindowTitle, process running, time, pixel displays, file system writes, etc. Actions like SLEEP are there to support catching the environmental queues with MMM internal IF statements to test conditions.
The same goes with reading environmental queues from websites. There needs to be a 'hook' that MMM can grab; something that MMM can pick up on from the environment and catch it within an IF statement condition. I'm not sure exactly what we can get from a web browser to tell us that a page has finished loading. I image that this would differ slightly for different browsers (firefox, chrome, edge, etc). If we can find what this 'hook' or environmental queue is perhaps we can catch it with MMM or, as you suggest, add a new feature to catch it in a condition statement.