Jump to content
bsg273

Getting Pixel Checksum of Control

Recommended Posts

bsg273

I've got a pesky checkbox in a login window (the vSphere Client login window) that causes AutoIt's controlCommandIsChecked to always return false regardless of if the box is checked or not. Thus, I decided to resort to performing a pixel checksum on the checkbox's control to determine if it's checked or not based on the checksum value. I must be doing something wrong though because it's not computing the checksum of the appropriate area at all. Here's what I came up with (I'm using Java) ...

AutoItX autoIt = new AutoItX();
String loginWindow = "VMware vSphere Client";

double pchecksum = autoIt.pixelChecksum(autoIt.controlGetPosX(loginWindow, "", "[NAME:checkUsePassthrough]"), +
    autoIt.controlGetPosY(loginWindow, "", "[NAME:checkUsePassthrough]"), +
    autoIt.controlGetPosX(loginWindow, "", "[NAME:checkUsePassthrough]")+autoIt.controlGetPosWidth(loginWindow, "", "[NAME:checkUsePassthrough]"), +
    autoIt.controlGetPosY(loginWindow, "", "[NAME:checkUsePassthrough]")+autoIt.controlGetPosHeight(loginWindow, "", "[NAME:checkUsePassthrough]")));

Any suggestions as to what I'm doing wrong here in capturing the coordinates of the control to compute the pixel checksum?

Share this post


Link to post
Share on other sites
bsg273

PixelCoordMode Option.

​I have no idea what that means.  Could you please explain?

Share this post


Link to post
Share on other sites
Jos

​I have no idea what that means.  Could you please explain?

​so you of course opened the Helpfile and did a search for it before asking ....  right? ;)

Jos

 


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×