Using the Viewer in Elipse E3: Chapter 7 – Command Shortcuts.

The E3 Viewer can be accessed via command line as follows:

     Viewer [server_name] [options]

The server_name argument stands for the name of the computer where the E3 Server is running. If this argument is not informed, a dialog box is displayed requesting the application’s server path.

The command line configuration options are:


PARAMS option

The values passed in this option can be retrieved via scripts by using the Viewer Params property.

All values return as strings. For example, if the Viewer’s command line contains the following parameters

Viewer -params Language=ENU

You can use the following code to check the Viewer’s initialization language

 Sub InitialScreen_OnStartRunning()

if Application.Params(“Language”)=”ENU”
Item(“Text1”).Value = “English (USA)”
Else
Item(“Text1”).Value = “Unknown Lanaguage”
End if

End Sub

The key’s string doesn’t differentiate between lower and upper case (that is, “language” and “Language” are read the same way), but the return values (especially if used with a Select command) do.

E3 WebViewer

When installing the E3 WebViewer, the e3web.asp, e3web2.asp, docwrite.asp, docwrite2.asp, and e3downloader.cab files are available to be configured by the user.

You can change docwrite2.asp‘s source-code to meet the desired settings by using the parameters below:

 Description  Param name  Value
 Domain  Domain  Server name
 Initial Screen  Screen  Screen name
 Enable ping  Ping  True or False
 Cache directory  cachepath  Directory
 Other servers  useservers  True or False
 Viewer Only  StartReadOnly  True or False
 Parameters  Params  Param1=Value1 Param2=Value2 …

 

Example:

var conteudo = "< object classid='clsid:7EB4D157-FACC-45BB-9536-C14B9DCE3CA7'"; conteudo += " width='100%' height='100%'>";
var domain = "192.0.0.21";
conteudo += '< PARAM NAME="Domain" VALUE=" ' + domain + '">';
conteudo += '< PARAM NAME="Screen" VALUE="">';
conteudo += '< PARAM NAME="CachePath" VALUE="">';
conteudo += '< PARAM NAME="Ping" VALUE="0">';
conteudo += '< PARAM NAME="StartReadOnly" VALUE="FALSE">';
conteudo += '< PARAM NAME="Params" VALUE="Param1=Valor1 Param2=Valor2 Param3=Valor3">';
conteudo += '< /object>';
document.write(conteudo);

Exercises

  1. Create a Viewer shortcut connecting to the local server on a screen other than the initial one.
  2. Set up a Viewer shortcut that passes three different parameters. All these parameters must be on the initial page, in displays.
  3. Set up the docwrite2.asp file to make the application open on a specific screen on Viewer Only mode.
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *