Jump to content

MouseClick wrong coordinates when display scaling is not 100% using ImageSearch


Recommended Posts

So here is my issue. I have a script that automatically adds coupons to my Dollar General account. Problem is when the display scaling is not 100%, the mouseclick does not click in the right spot when using imagesearch. How can I fix this?

What is Display Scaling

https://github.com/BetaLeaf/Dollar-General-Digital-Coupon-Bot

 

 

Dollar-General-Digital-Coupon-Bot-0.1.zip

Edited by BetaLeaf

 

 

Link to comment
Share on other sites

Can you keep the Display Scaling at 100%?  You probably already found JohnOne's and mLipok's solution: here.

Is your issue the DPI explained: here?

Note the  section: "

    This setting is stored as the DpiValue DWORD data value in a long subkey per display in the registry location below.

    HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings

"

It should be possible to compute an offset from the value stored there.  I won't be going to back to Windows 10 right away and I don't know much about this problem.

The first topic I mentioned described the DesktopWidth, Height readings varying from the Desktop Display Properties of Windows.

It looks like something can be done but I can't really test against this problem until I purchase Windows 10.  (So that I have restoration media)

Link to comment
Share on other sites

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...