BetaLeaf

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

4 posts in this topic

#1 ·  Posted (edited)

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

False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

SoundBoard - Play any song or sound you want at the press of a hotkey.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
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)


I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

On my laptop, everything is too hard to read at 100% scaling and needs to be set to 150%. Unfortunately, changing the scaling is not a viable option for me. Making an offset might work. I'll test later.


False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

SoundBoard - Play any song or sound you want at the press of a hotkey.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
Share on other sites

Can you read the Images that you save from the scaled value?  Then compare against the scale value for a match?


I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

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