Flynet Studio Code Generation Properties

Default Host Keys Searching

Default Host Keys Searching

Previous topic Next topic  

Default Host Keys Searching

Previous topic Next topic  

Theses two string values are generated as part of a Regular Expression used to find keys on screens that have not been recorded, or do not have a clear exit key defined.

 

In the generated code, the [projectname]TaskCG.cs module contains a number or definitions related to searching.

 

Regular Expressions:

 

Two virtual properties are defined in the CG module, which can be overridden in the user [projectname]Task.cs module.  They are:

 

Regex FindExitRegex {get;}

Regex FindReturnRegex {get;}

 

By overriding these, you can customize the regular expression used to find exit and/or return keys.

 

Methods:

 

Two virtual methods are defined that can be overridden:

 

string FindExitOrReturnKey()
 
The base implementation will search the bottom three lines of the active screen, starting with the bottom line and moving up, first for a key description matching the FindExitRegex property, and then one matching the FindReturnRegex.
 
If neither is found, will return the active task's navTowardsHomeKey.
 

string FixToHomeKey(string fx)
 
The base implementation takes the text found by one of the regular expressions (for the key) and does its best to convert what is found to a valid keyboard mnemonic for use in a NextScreen method.  If your system's key descriptions are very different than what is anticipated in the design of the FixToHomeKey method, override it and customize to the peculiarities of the system.