Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

Description

The EXEC command can be used to send strings to the Command Machine for execution. This enables a BASIC program to do things that are not possible by using the Scripting Language only. The EXEC command needs a single string that is submitted to the command machine during runtime. The Command Machine doesn't distinguish between 'normal' commands and those that came from a BASIC program. Therefore, textual output of the command is always send over the current I/O interface.

Example

This program instructs the Command Machine to show the top level directory of the current mass storage device:

outmode -2
exec "dir"

Remarks

Prior to firmware version 3.26, there is a conflict with the 'inmode' command:

If inmode is set to -2 or -3 all inputs are redirected to BASIC. Thus, a command issued via exec command is not executed, but also redirected. Example: inmode -2 ; exec "dir logs" does not work, since the "dir logs" text is send to Basic. Workaround: place an inmode 0 command before the exec command and after the exec set the original inmode.