Show/Hide Toolbars

Inventu Viewer+ Server Macros

At the time of this writing, there is only a single implementation method, which is "run" which returns a provided enumeration MacroRunResult.

 

The run method is called after the construction of your server macro, and contains the complete logic.  The FVTerm hosting environment and the ServerMacro base class take care of synchronizing with user input, so that your logic can flow in a procedural manner, start to finish.

 

Here is a simple example based on the provided "Insure" Simulated Host application distributed with Inventu Viewer+.  This example displays a message box to the user, then signs the user into the simulated Insure host using hard-coded userid and password values.

 

 public override MacroRunResult run()

 {

         MacroDialogRC rc = this.ClientMessageBox("Would you like me to Logon?""Sample Logon"

                 MacroMessageType.info, MacroButtons.yes | MacroButtons.no | MacroButtons.cancel);

         if (rc == MacroDialogRC.yes)

         {

                 this.oScreen.putCommand("simmy[enter]",2000);

                 this.oScreen.putCommand("2[enter]", 2000);

                 this.oScreen.putCommand("simmy[tab]host[enter]",2000);

                 this.oScreen.putCommand("[clear]", 1000);

                 this.oScreen.putCommand("info[enter]");

         }

         return MacroRunResult.ok;

 }

 

When run, the user will see:

 

clip0007