|
Post by Johnc on Sept 5, 2018 16:32:14 GMT
I have noticed the MMM delay time changes with different versions of MMM. This makes old macros written with older versions of MMM not work well with a new version of MMM. This is particular an issue with timing critical tasks like web info gathering etc.
Is it possible to use absolute timing for the delays and wait? i.e. line 18's 1 second delay is based out of system timing. line 20's 1000ms is also based upon system timing and not by relative delay.
Another possible solution without setting absolute timing is that for web browsing, is it possible: 1) for MMM to indicate a webpage has been fully load? 2) a pop-up download window is open? 3) whatever indicators to indicated an end of a web action?
Thank you for your consideration!
18 | RUN ACTION | | | | WAIT SECONDS | 1
19 | IF | WINDOW TITLE | runscript | NOT EXIST | CONTINUE
20 | 600 | 52 | 1000 | Left Click Down
|
|
|
Post by Johnc on Sept 5, 2018 20:01:35 GMT
The more I think about it, the more I think I should not rely on the absolute timing of MMM since the web latency is a variable. Writing codes that utilize the following is probably a better idea.
Another possible solution without setting absolute timing is that for web browsing, is it possible: 1) for MMM to indicate a webpage has been fully load? 2) a pop-up download window is open? 3) whatever indicators to indicated an end of a web action?
I know checking the colour value can be useful too... Thanks.
|
|
|
Post by Steve on Sept 6, 2018 23:12:58 GMT
Hi John,
Let me clarify the timing from your example.
18 | RUN ACTION | | | | WAIT SECONDS | 1 19 | IF | WINDOW TITLE | runscript | NOT EXIST | CONTINUE 20 | 600 | 52 | 1000 | Left Click Down
Line 18 waits 1 seconds then line 19 starts line 19 executes and almost instantly moves to line 20 (if the window title does not exists) Line 20 waits 1000 ms before is starts
The internal mechanism for timing is the same for both line 18 and line 20. The 'wait 1 second' and the '1000 ms' delay technically both use an internal 'thread wait'. There is not system timing vs relative delay type of comparison here.
The delays that can happen that may effect static hard entered timing events is the delays caused by things you have mentioned. Such as the time it takes for a webpage to load. To work around this you need delays added to your macro or conditions that check for these environmental queues from the OS.
|
|
|
Post by Johnc on Sept 7, 2018 2:07:42 GMT
Hi Steve,
I am not sure what is "internal thread wait" or "environmental queues from the OS" LOL, as I am not a windows programmer...! At most I am a Windows batch file/Unix Shell script programmer from the old days LOL!
I was just looking for a way to have an absolute and accurate time delay in MMM but I was probably chasing a red herring LOL!
The more I play around with web page loading time, the more important I think the "Pixel Colour" ACTION is. The pixel colour can signify that a certain window has popped up and a certain page has finished loading etc... Therefore I think making this Pixel colour action more versatile would definitely help deal with the varying web timing.
For example, to detect a pixel colour change/shift, rather than looking for an absolute colour value. Another example is to use multiple pixels references to avoid false detection.
Just a couple I can think of now. Thanks!
|
|