Although this feature can be very useful, it could also be very dangerous.
Therefore this feature works only from local pages (with a URL starting
with file://localhost/
), and only if the
Allow Shell commands setting
is selected.
x-aweb:command/your_DOS_commandIf the user clicks on the hyperlink, your_DOS_command is executed. The output of the command is directed to an auto opening console window, unless you specify another output redirection in your command.
Because compatible HTML mode stops the
URL at a space, make sure you have escaped all spaces in the command
by " 
" or else the command won't work if the
user has selected compatible HTML mode.
Example:
<a href="x-aweb:command/dir sys: all">get dir</a>
would allow the user to execute the dir sys: all
command by a click on the words "get dir
".
Note: The DOS command is executed in a separate shell, with a current directory set equal to the current directory of AWeb. You are advised to use only absolute path names in the DOS command, or else the result will depend on which directory happened to be the current directory when you started AWeb.
x-aweb:rexx/your_ARexx_macroIf the user clicks on the hyperlink, your_ARexx_macro is started with the ARexx port for this window as the default command port.
ACTION="x-aweb:command/your_command"
attribute in your <FORM>
tag to execute the command
if the user submits the form. Similarly, you can include a
ACTION="x-aweb:rexx/your_macro"
attribute to start
the ARexx macro.
Form parameters are converted to Amiga DOS style parameters: the field name will be used as the argument name, and the field value will be used as argment value. The value will be quoted, with the escape, newline and quote characters in the value escaped as required by Amiga DOS.
Note: switch arguments (/S) cannot be passed in this way. You could use a script instead, like the example below.
OPEN
command for
this purpose. If you re-use the name of your file for different responses,
be sure to add the RELOAD
switch to prevent AWeb from showing
the previous (cached) document again.
Of course, this will work better from within an ARexx macro than from
within a DOS script. In a DOS script, you have no way of determining to
which ARexx port you should address the OPEN
command.