0

I want to check, whether a background that was grey turned into black. Usually I wait for changes of attributes like this:

Aliases.MyApp.BtnCalculationType.WaitProperty("Enabled", "True", 9999999);

Unfortunately

Aliases.MyApp.BtnCalculationType.WaitProperty("Fill.Color.B", "0", 9999999);

does not work. What to do instead?

1
  • What exactly does "does not work" mean? Are you getting any error messages?
    – Helen
    Commented Sep 30, 2013 at 15:46

1 Answer 1

1

Firstly, the Fill.Color.B property value is a number, not a string, so you need to remove quotes around 0:

Aliases.MyApp.BtnCalculationType.WaitProperty("Fill.Color.B", 0, 9999999)

Secondly, Fill.Color.B is the color's blue component. You may need to also check the red, green and alpha components. To do this, you need to use a custom comparison instead of WaitProperty (WaitProperty doesn't support checking multiple properties at once). For example:

// JScript
var btn = Aliases.MyApp.BtnCalculationType;
while ((btn.Fill.Color.B != 0) || (btn.Fill.Color.R != 0) || (btn.Fill.Color.G != 0))
  Delay(500);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.