User guide
eWON 500-2001-4001-4002 User Guide - User defined Web site
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 190
10.4.3 Execute an eWON script
The purpose of this form is to execute an eWON script command line by posting a FORM from the web server. Using this feature, you can have
a button in the Web page that starts execution of a script section.
The form allows executing a sequence of one or more script commands. Each command is executed as if it was typed and executed from the
Script Control window. If more than one command is specified, they are executed in sequence.
The length of the command line is limited to 250 chars.
10.4.3.1 Syntax
Form name: ExeScriptForm (case sensitive)
Form fields name
Command
ResultPageOk
Or:
Command1
Command2
...
CommandN
ResultPageOk
If there is only one script command to execute, the first syntax can be used. If more than one command must be issued, the second syntax
applies. The second syntax requires that the CommandX fields starts with Command1 and goes on by increment of 1.
Note:
If Command1, Command2 and Command4 are defined, only Command1 and Command2 will be executed because Command3 is
missing.
ResultPageOk is a field that is also usually hidden. This field is optional and defines the page to show when the update has been performed.
WARNING:
The page URL must be specified from the eWON root: i.e.: /usr/xxxx
As for execution of command directly from the Script Window, and when the program is running, the command is executed between 2 sections
executions. This means that the command will NEVER be executed between 2 lines of instructions inside a script.
For example, the commands will be executed between 2 executions of a cyclic section, or after the complete execution of an OnTimer section. In
other words, the commands are always executed after a script END command of a section being executed.
When the FORM is posted, the result page returned by the eWON web server is not sent after execution of the command. The command is
actually posted for execution but there is a queue of commands that can be more or less filled, and a section execution may be in progress also.
This means that if your result page contains fields that should be updated by your command, it is normal that these fields are not yet updated at
the time the response page is sent by the eWON web server.
Any script command can be issued with this form, including Goto commands (Do not use Gosub because the rest of the line after Gosub is not
executed).