Jump to content

ControlCommand IsEnabled with this particular button not working / Searching for a workaround?


CoDeX2k
 Share

Recommended Posts

Hello everybody,

I am having troubles with a button in a delphi coded application. I had an another TFrm where I could read out the enabled state very well... But in this TFrm where I now have to automate somehting it always gives me back 0 instead of 1. So I am am searching for a workaround?

I have two ideas. The first one is that I saw the Style of this particular button change from 0x5C01000B (disabled) to 0x5401000B (enabled). But I only get this info thru the AutoIt v3 Window Info tool... I dont know how I can get this info else where....

Second Idea was to PixelColor grab the color of the Caption of the button if it is greyed out it is disabled if it is black it is enabled... But I also would need help there because I never done that before. I know how to get one pixels color but then the window must open always at the same place which is not working on my machine...

Any other ideas or help with my two ideas are welcome

Thank you guys

Regards

CoDeX2k

Link to comment
Share on other sites

I understand that you're trying to avoid using the ControlCommand() to obtain what you need, however, would you mind posting the code you used that didn't work, as well as the control info from the autoit window info tool?

Let's see if maybe there was something missed in the code that's causing the issue as opposed to attempting to 'hack around' the problem.

If the code includes any Win...() commands, i.e. winactivate() winwait() etc, please include those. Sometimes it's a matter of window focus/visibility and the such.

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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