JPT. - Jump if Pattern

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > ! User-Macros > PAT. - Pattern Recognition Command >

JPT. - Jump if Pattern

JPT.

Previous Top Next


JPT.

Conditional jump based on screen patterns

 

Syntax

 

JPT.Subcommand|Parameters|Label

 

Description

 

JPT (Jump if Pattern True) evaluates a condition and jumps to the specified label if the condition is TRUE. If the condition is FALSE, execution continues with the next line.

 

The Label is always the last parameter.

 

 

Subcommands

 

JPT.TextExists|Text|Label

Jump if text exists on screen.

 

JPT.TextNotExists|Text|Label

Jump if text does NOT exist on screen.

 

JPT.AtPosition|Text|X|Y|Tolerance|Label

Jump if text found at position (X,Y) within tolerance.

 

JPT.Found|Text|MinConf|Label

Jump if text found with confidence >= MinConf.

 

JPT.SymbolAt|X|Y|W|H|Label

Jump if symbol detected in region (X,Y,W,H).

 

 

Example

 

PAT.Init

PAT.SetFont|Arial|14

 

' Check for success message

JPT.TextExists|Success|Lab_Success

MBX.Operation failed!

JMP.Lab_End

 

:Lab_Success

MBX.Operation succeeded!

 

:Lab_End

PAT.Shutdown

 

See Also

 

IPT. - If Pattern condition

PAT. - Pattern Recognition