Show/Hide Toolbars

Flynet Viewer Developer User Guide

 

This section assumes that you have acquainted yourself with the Workflow Recording and Screen Mapper. This example will use the definition file that is installed with Flynet Viewer, namely: Insure.xml

 

Flynet Viewer is able to load definition files automatically if their names have been entered into the "DefinitionsList" registry entry. This can be done using the Admin Console. In the screen below, the Definition File List is set with the Insure.xml definition file. More definition files can be added to the list by separating them with a ";" (semicolon).

 

Admin console service settings

 

An alternative method to using the Admin Console to handle definition files is to use the ScreenDefControl object's load method. This method is able to add and remove files from the Definition File List. For example, the following code would not only load the definition file into memory, but it would add the Insure.xml entry to the Definition File List and also check for any changes to the Insure.xml file.

 

 

 

If the load method's second parameter (MonitorChanges) is set to zero, the definition file would be loaded into memory, but removed from the Definition File List, and no checks for any changes to the definition file would be made.

 

The following is an excerpt from a definition file of a screen definition.

 

 <Screen name="Start" activeRef="0">

         <Recognize Type="include" row="2" column="31" Text="USER PROFILE"/>

         <Recognize Type="include" row="22" column="7" Text="User Profile"/>

         <Reference recFile="SignOn.rec" timeStamp="14:14:20.293" name="Start"/>

         <FieldMap name="default">

                 <Field name="UserProfile" row="22" column="23" length="8"/>

                 <Field name="Password" row="22" column="53" length="8"/>

         </FieldMap>

 </Screen>

 

The above definition provides information that allows Flynet Viewer to identify if the screen is active. The two "Recognize" elements are used to check whether the text is located at the specified locations on the active screen. If they are then the HostScreen object's getScreenName method would return the value "Start". Additionally, a field map has been defined for the screen which means that the mappedGet and mappedSet methods can be used to set or retrieve the values of the text at the specified locations by using the value specified in the "name" attribute.