|
Post by jtk001 on Jul 8, 2019 19:55:18 GMT
I am trying to see if there is a better way to work with browser forms and menu options other than using automated mouse clicks? Currently I am automating daily reports using mouse clicks at specific locations on the screen. This works great until I work on my laptop without external monitors or move to a different docking station or when the wondow size makes it so the menu option is not in the correct location. Is there any way to select a menu or drop down box in a browser by identifying it by name, and then also select the drop down option within that menu option the same way?
|
|
|
Post by Steve on Jul 12, 2019 6:59:57 GMT
If the forms and buttons are static and repeatable (they don't change how they are on the webpage) then maybe instead of mouse clicks 'tabs' and 'left right' etc can be used from the keyboard. There is not an easy solution. Options include detecting pixel and color changes to find logos and objects then clicking there (PIXEL RANGE ( www.turnssoft.com/conditions.html#pixelrange)). Check out www.turnssoft.com/conditions.html for some more examples and this forum for some code examples.
|
|
|
Post by Nathaniel Gibson on Jul 20, 2019 1:44:31 GMT
Regarding using PIXEL COLOR, I'm finding it to be very flaky... Sometimes it works, and sometimes it doesn't, *using the exact same input*.
I'm trying to use MMMPro to test a pixel for a specific color (which I've confirmed both from within MMMPro and MS Paint's eyedropper) on a specific pixel, and stop the macro so that I can examine the screen if it matches.
Specifically:
2 | IF | PIXEL COLOR | Color [R=141, G=170, B=71]::At Location [X:598 Y:344] | IS THE SAME | STOP
This works only about half the time, or to put it a different way, it works for a while, then stops working even though I've not changed any code.
Thoughts? Thanks!
nighthawk4276 at gmail dot com
|
|
|
Post by Steve on Jul 22, 2019 7:10:57 GMT
I'm not sure why it would only be working half the time for you. I've tried to replicate failure with this and just can't. Are you doing something 'tricky or out of the ordinary with the target pixels? For example is your Location X and Y residing within a VM or running Java app or the like? Could the local system have any issues rendering the content for the condition at run time? Just trying to come up with some scenarios where this might fail.
|
|
|
Post by Nathaniel Gibson on Jul 24, 2019 16:43:26 GMT
I think I figured out what's going on.
When a script is still running and you modify and then save it MMM gets unstable and warns you that you tried to modify / save a running script. It's *after* this point that PIXEL COLOR seems to not work properly.
Have learned my lesson on the whole not modifying running code. However, perhaps that error message should have an additional line that suggests quitting any running instance of MMM and restarting it to clear any potential issues?
|
|
|
Post by Steve on Jul 24, 2019 21:52:35 GMT
Ah yes editing the macro list during a running macro throws the whole macro off completely. I'll take a look at the error to see if it can be represented a little cleaner. Cheers.
|
|