How to Determine if a Button Is Active and/or Exists

I have a macro that uses "Press Button Media Details... When enabled" and it works fine in that it pauses the macro until the button is active (it always exists). And when I do something to make the App activate the button (link a jpg file) then the macro proceeds as planned.

However there are times when I want the macro to proceed without this step (if I don't have the appropriate photo handy for example) and so instead of "Wait for enabled Button" I'd like to determine if the button is enabled and move on if it isn't. (see example screenshots below)

I have tried to have the macro push the button without "wait for enabled" set (X) and then test the %ActionResult% but it was "OK" no matter the state of the button. So any thoughts as to how to test the enabled/disabled state of a button in an app?

Screenshots of "Media Details..." button in inactive and active states


Have you tried the button condition in an If Then Else action?

1 Like

Is there an emoji for "dope slap" ... if there is I give it to myself... and I hereby commit to studying all the options for flow control.

thanks for you very polite suggestion that I had not tried, but which in fact works perfectly to do what I wanted.

Dave

1 Like

Here you go: :man_facepalming:t2:

I'm surprised that emoji still works, as I've worn it out myself over the past couple of years! ! glad you have what you need. :+1:t3:

1 Like