Is there a way to click on the image found in "Pause Until Found Image"?

Lots of time I do a “Pause Until Found Image Condition”, followed by a “Click at Found Image”, which of course searches for the image again.

Is there a way to combine these, so I don’t need to do the search again?

1 Like

Not really.

You could do something like:

  • Until
  • variable Location is not empty
  • Click at Location.MidX, Location.MidY

I’ll see if I can add some direct support for Click at Found Image to pause until the image appears.

Thanks. I suppose it might apply to an “If image exists” action, also.

I was thinking (and I know having a user suggest a solution is rarely useful, but I can’t help myself) that perhaps these actions could just set a token. That way you wouldn’t have to change the UI, and it would be easy to use.

2 Likes

It seems like a good idea that all found-image actions make the coordinates available to the user, and returning a token would seem to be the most economical method.

-Chris

1 Like

Any news on that? Would be interested too.

That sounds great, I do this all the time as well and in fact currently working on several macros that do just this since Keyboard Maestro doesn't detect background applications with a window at the front.

Nope. there is no time frame on this.

Comes up for me frequently because I use KM to manipulate a medical record system via Citrix: since the OS can’t detect UI elements, I have to find them graphically :stuck_out_tongue:

It’s painful to have the system search for the picture repeatedly (first, watching for it during “pause until,” then having to re-find after it’s finally been found! :frowning:), taking more cpu and battery, and also having to store the target image twice in the KM macro file :frowning: because it’s in once for the pause until and again for the click…

Do hope the pause-until action can store coordinates to prevent this :slight_smile:

1 Like

The only current solution is to use Find Image instead of Pause Until, as I described in my initial reply on this topic.

So do a loop and test to see whether find was successful?

Correct.

I’m trying to use KM in a particular workflow in Citrix (Epic) that depends on KM knowing what the name of a pop-up dialog window is. Do you know any way of doing that?

Have you tried using the KM Token "%FrontWindowName%" ?

Would that work? I don’t think that KM “sees” windows in a virtualized Citrix environment.

I should have clarified: this isn’t a popup window generated by citrix.app. It’s a popup window in the virtualized Citrix screen. A Windows application called Epic Hyperspace.

Probably not, but it's worth a test macro to confirm one way or the other.

You also might try:

I my Citrix environment, it DOES correctly fetch the name of the front window! Thank goodness, because it decreases how much I have to check the screen! :grin:

I think there was something funky about there being an extra character in a window or something (at least at one point), so if doesn’t work, try doing a regex for something you know is in the title!

near-total KM neophyte here. Now I just have to figure out how to use the window title in an if/then.

Can you post some sample code for the macro that shows how you identify a window name in Citrix?

Here's an example. It tests for window containing "Hyperspace" in the title. It is a Citrix window and is detected by Keyboard Maestro with no problem...

1 Like