Wiki Update: Found Image Related Articles

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

Hopefully you now understand that "ImageLoc" is a KM Variable.
I have updated the KM Wiki to make this clear.

@ajg23, thank you for your suggestions. I have tried to update the following KM Wiki pages to reflect your suggestions. Please review and let us know if you have any further suggestions.

##Wiki Update
Submitted for everyone's review, comment, and/or revision, the following Wiki article has been updated:

  1. FoundImage Token
  2. Found Image Condition
  3. Pause Until Action
  • Actually, did NOT make any changes here, since this Action uses many Conditions other than Found Image. But the Found Image condition does use a "Pause Until" action as its example.
  1. Find Image on Screen Action

Primary Changes

  • Provide more unity, consistency, and completeness to the articles that release to found image.
  • Add icon, header, and example screenshots.
3 Likes

Great overall--thanks as always for your excellent work!

Couple comments:

#Pause Until action page

  • I do think there should be an example of using the FoundImage token here--this is THE place users who would benefit from this will look to see what is possible!
  • At the very least, would add under See Also:

Tokens

  • FoundImage (very useful if you use this action to pause until image appears on the screen: allows you to do something with that image such as click in the center of it)

#Find Image on Screen action page

  • recommend adding FoundImage token to See Also there as well, ideally with notation about difference:

Tokens

  • FoundImage (returns coordinates of image found from other actions; it can be stored in a variable and used like the ImageLoc example above)

#FoundImage token page
The first line below will not be enough for most users to realize that they can't just start adding .x, .midx, etc to FoundImage, because what really jumps out is the bulleted list which shows all the fun things you can do.

If you set a Variable (say ImageLoc) to this token, then you may reference individual properties using this notation:

  • ImageLoc.x — Horizontal position of upper left corner.
  • ImageLoc.y — Vertical position of upper left corner.
  • ImageLoc.width — the Width of the match (same as the source image).
  • ImageLoc.height — the Height of the match (same as the source image).
  • ImageLoc.fuzz — the Fuzz of the match.
  • ImageLoc.Midx — Horizontal position of center.
  • ImageLoc.Midy — Vertical position of center.

Perhaps something like:

You can get components of this information and have KM do convenient calculations on them like this:

  1. Assign a variable to the value of FoundImage (here, using example "ImageLoc"):
  2. That variable can be used like a variable created by the Find Image on Screen Action. So in the above example, the notation would be as follows:
  • ImageLoc.x — Horizontal position of upper left corner.
  • ImageLoc.y — Vertical position of upper left corner.
  • ImageLoc.width — the Width of the match (same as the source image).
  • ImageLoc.height — the Height of the match (same as the source image).
  • ImageLoc.fuzz — the Fuzz of the match.
  • ImageLoc.Midx — Horizontal position of center.
  • ImageLoc.Midy — Vertical position of center.

Hope these are helpful!

2 Likes