Checkbox difficulty

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Checkbox difficulty

Post by NancyM » Thu Jul 21, 2016 4:44 pm

I'm able to use the UIClick to toggle a checkbox, but I'm not able to get the value of the checkbox. I've tried GetCheckBox (returns -1) tried UIGetValue (always returns 0). I can focus the checkbox, but I don't know how to use what is returned from that.

Any suggestions?

Thanks!

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Checkbox difficulty

Post by Marcus Tettmar » Fri Jul 22, 2016 8:54 am

Not all check boxes work as expected in this way and you may not be able to get a value.

If you can't determine what state the checkbox will be in at the outset (often with automation it will always start with a known state) then I would recommend using Image Recognition to determine whether it is checked or not. Capture it in one or other state, then if found, it's in that state, if not found, it's not.

Or consider GetPixelColor to test the color of a pixel within the checkbox area.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts