User Tools

Site Tools


token:FoundImage

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
token:FoundImage [2017/11/15 04:53]
peternlewis
token:FoundImage [2018/01/18 21:57]
JMichaelTX ADD icon and header
Line 1: Line 1:
-The //​%FoundImage%//​ token (v8+) returns the details of the last found image in this execution instance. The token will be a rectangle containing the match followed by the fuzz of the match (0-100), ie, (left,​top,​width,​height,​fuzz).+{{:​condition:​image-icon.png?​nolink|}} 
 +====== FoundImage Token ======
  
-You can easily access the individual parts using the token array notation, eg %FoundImage[3]% will be the third value (v8.0.4+).+The //%FoundImage%// [[:​Tokens|Token]] (v8+) returns the details of the last found image in this execution instance. The last found image could have been found by a number of //Actions// or [[:​Conditions|Conditions]],​ like [[action:​Find_Image_on_Screen|Find Image on Screen Action]].
  
-===== See Also =====+The token returns the same data about the last found image as the [[action:​Find_Image_on_Screen|Find Image on Screen Action]]: 
 +  * left 
 +  * top 
 +  * width 
 +  * height 
 +  * fuzz
  
-=== Actions ===+For example, after finding an image on the second monitor, this token would return:\\ 
 +`2060,​136,​60,​56,​0` 
 + 
 +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. 
 + 
 +The following result in this token being set to the last found image:
  
 * [[action:​Find_Image_on_Screen|Find Image on Screen]] action * [[action:​Find_Image_on_Screen|Find Image on Screen]] action
 * [[action:​Move_or_Click_Mouse|Move or Click Mouse]] action * [[action:​Move_or_Click_Mouse|Move or Click Mouse]] action
 +* Any [[:​Actions|Action]],​ like the [[action:​Pause_Until|Pause Until Action]], which uses the [[condition:​Found_Image|Found Image Condition]]
 +* FIXME: ​ Others??
 +
 +
 +
 +===== See Also =====
 +
 +=== Actions ===
 +
 * [[:​Actions|All Actions]] * [[:​Actions|All Actions]]
  
token/FoundImage.txt · Last modified: 2018/01/18 21:57 by JMichaelTX