Custom Scripts Introduction
You create Custom Simulated Host Scripts using a standard programmer's editor, whichever is your favourite.
Note that Flynet Studio can generate comprehensive scripts based on one or more Screen Workflow Recordings. This feature is highly recommended as a starting point for the creation of custom scripts.
Since Simulated Host Scripts are standard XML files, an editor which is XML syntax-aware is useful.
Helpful Hints for Custom Scripting
• | Use the Trace File Viewer: The screen maps in the Simulated Host script files are compatible with the screens displayed in a trace file in the Flynet Viewer Trace File Viewer - if you copy-and-paste from the viewer it can accelerate your ability to create a custom script |
• | Only add logic where it is needed: While there is logic, navigation and events definable in a script, if you just have a series of screen entities, the Simulated Host will automatically put-in navigation from screen 1 to screen 2 to screen n, and then back to screen 1 |
• | Remember that Custom Scripts are "Strict" XML: That means if a single tag (no closing tag), you need to remember the / to close the tag (<Else/> is an example). |
• | Another XML tip - Case sensitive: Tag names and attributes are case sensitive. Tags usually start with an upper case character, then are mixed case, while attributes start with a lower case character and are mixed on the next major component of the name. |
• | The Missing Link: Variables: This version of the Simulated Host is missing the ability to set and perform logic on variables. Due to this limitation, the complexity of the applications that can be simulated with the Simulated Host is really limited! Unless...you implement tricks like putting hidden fields on the screen that you can then read/write to using the IfScreen and PutScreen tags |
Custom Script Schema (Layout)
The Custom Script XML layout is as follows:
<SimHost normalRows="24" normalColumns="80"
altRows="27" altColumns="132">
<Screen name="MyScreen">
<Map cursorRow="22" cursorColumn="15"><![CDATA[
**** Screen Map Goes Here ***
]]></Map>
...can have more than one <Map>...</Map>
<Script event="eventname">
<IfAid key="clear">
...action/logic tags go here
<Else/>
...action/logic tags go here
</IfAid>
</Script>
...can have more than one <Script>...</Script> event block
</Screen>
...can have as many <Screen>...</Screen> entities as you want
</SimHost>