User Tools

Site Tools


Found_Image

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
Found_Image [2016/03/06 02:34]
AlainLifchitz better wiki syntax for internal links
Found_Image [2019/07/08 00:35]
peternlewis [Search in Specified Area]
Line 5: Line 5:
  
 There are various actions ([[action:​Move or Click Mouse|Move or Click Mouse]], [[action:​Find Image on Screen|Find Image on Screen]], [[condition:​Found Image|conditions]] and [[collection:​Found Images|collections]] that search the screen for a matching image. There are various actions ([[action:​Move or Click Mouse|Move or Click Mouse]], [[action:​Find Image on Screen|Find Image on Screen]], [[condition:​Found Image|conditions]] and [[collection:​Found Images|collections]] that search the screen for a matching image.
 +
 +**Example: Click on Found Image**\\
 +This is how the Action appears when first inserted into your macro.{{:​click-found-image-action-initial-setup-km-7.3.png?​nolink|}}
 +
 +
  
 ===== How To Use ===== ===== How To Use =====
 +==== Specifying Fields in Found Image Actions ====
 +
  
 - **Specify the image to match** ​ - **Specify the image to match** ​
Line 16: Line 23:
         * Because of transparency and anti-aliasing almost all screen matches are fuzzy to some degree.         * Because of transparency and anti-aliasing almost all screen matches are fuzzy to some degree.
         * But usually about 20% is a good place to start.         * But usually about 20% is a good place to start.
-- **Optionally ​highlight ​Found Matches** +- **//Must be Unique// Checkbox** 
-        * This can be helpful in determining the right amount of fuzz to use. +        * If //​checked//,​ then the image must be the only image in the specified area, or the //Action// will fail. 
-        * It can also show when an image is being found in more than one location.+        * If //not checked//, then best one of the images (based on an internal algorithm) will be selected. ​ If there are multiple similarly good matches then it is unpredictable which one will be used. 
 +- **//​Display//​ Checkbox -- If //​checked//,​ it will highlight ​on the screen all found matches** 
 +        * This can be helpful in debugging, like determining the right amount of fuzz to use. 
 +        * It will also show when an image is being found in more than one location.
 - **Choose Where to Search for Image** - **Choose Where to Search for Image**
-      ​* All screens. +  ​* All screens. 
-      * Main screen. +  * Main screen. 
-      * Specified screen (counting from the left). +  * Specified screen (counting from the left). 
-      * Front window. +  * Front window. 
-      * Window with a specified title. +  * Window with a specified title. 
-      * Window with a title containing a given string. +  * Window with a title containing a given string. 
-      * Window with a title matching a given regular expression. +  * Window with a title matching a given regular expression. 
-      * Specified window (counting from the frontmost window). +  * Specified window (counting from the frontmost window). 
-      * Specified area on the screen.+  * Specified area on the screen. 
 +    * For instructions on how to get data for area, see [Determine Location of Area to Search for Found Image](https://​forum.keyboardmaestro.com/​t/​using-mouse-display-window-to-get-window-specific-locations/​7112/​9) 
 + 
 +==== Search in Specified Area ==== 
  
 Remember when specifying the area, as with all [numeric fields](:​Text_Fields),​ the numbers can be calculations including [functions](:​Functions),​ and the fields expand to allow for longer expressions as soon as you type something other than a number, so this allows very precise control of where you can match. Remember when specifying the area, as with all [numeric fields](:​Text_Fields),​ the numbers can be calculations including [functions](:​Functions),​ and the fields expand to allow for longer expressions as soon as you type something other than a number, so this allows very precise control of where you can match.
 +
 +
 +{{ action:​click-found-image-action-example.png?​nolink&​503x407 | Click at Found Image Example }}
 +
 +===== Search Speed and Accuracy =====
 +
 +Keyboard Maestro uses a relatively fast search to make the action perform in a reasonable amount of time, but it can result in not finding some images.  ​
 +  * Images Difficult to Match
 +      * The most difficult images to match are small grey images (like icons or text).
 +      * Since the screen tends to be filled with small grey areas, it is hard for Keyboard Maestro to find the best locations to look.
 +  * Increasing Search Accuracy
 +      * Set Search Area to less than a quarter of the whole desktop
 +      * This will improve ability to find smaller images that have low contrast
 +
 +===== Testing =====
 +
 +When testing found image macros:
 +
 +* ALWAYS hide the Keyboard Maestro editor – as the image in the found image action may be found too under some circumstances.
 +* ALWAYS turn ON the “Display” checkmark, so you get visual confirmation an image has been found.
 +* If the image is NOT found ALWAYS play with the fuzz slider.
 +* It's generally a good idea to initially test on the main monitor in the front window.
Found_Image.txt · Last modified: 2023/09/12 04:11 by peternlewis