This is my very first post to the UI Vision forums. I’m trying something more basic with the Windows Calculator application based on one of your examples.
I’m able to open and close the gnome-calculator application on Linux Mint, but on Windows 10 I’m able to open the calculator application, but not close it.
I have tried OCR with XClick and XClick relative by setting the precision to 0.6.
Then I tried type and XType in the following combinations as shown in the screen shot, but none of these work!
However, when I use the Alt+F4 combination manually, I’m able to close the calculator.
Any suggestions on why this doesn’t work through the macro?
I’m pursuing the same line of thinking. But here is my issue. When I debug the code, the automation is able to find the image.Although it finds the wrong “x” I was thinking if I could click on it and get the focus back to the Calculator window, I could then use the combination keys. But the problem is that when the Macro runs, it isn’t clicking on the x that it sees during debug.
thanks for pointing out the issue with the key press code.
Hi, I was able to get it to work! The code is below. I tested this on dual screens, my laptop and the larger monitor and it works without issues. I think the gray-black contrast of the images is a problem. In Mint Linux it was really easy because the calc icon has 3 colors!
You are correct that I could use a larger image. But the problem is that the mode “Standard” can change. If I switch to mode “Scientific”, and close the calculator, the automation will fail because next time the calculator will open in Scientific mode and the image scan will fail! I was trying to use something that is not bound to change on the UI.
My corrected code is below. Pretty straight forward 3x lines in Green and no image-OCR required!
I’m hoping someone tries out this case and lets me know if they’ve had better luck. I have tried the following images including this last one with XClickRelative. The automation isn’t able to find such a grey-black contrasting image even with 0.4 confidence level!