Please enable JavaScript to view this site.

A-Shell Reference

Added January 2017

xcall XSHLEX, objectspec {,status, action, parms, dir, showflags, waitflag, clisvr, exitstatus}

XSHLEX.SBX provides a standardized and robust way of doing a "Shell Execute"—i.e. launch the application that goes with a specified file or URL object—without having to consider which platform you are using. This does not provide much advantage over MX_SHELLEX for those in a pure local Windows environment, but for developers programming across various environments, it eliminates the need for logic to deal with local/remote and file transfer considerations. For example, in an ATE environment, it detects if the object is a file on the server, and if so, transfers it automatically to the ATECACHE directory when it then launches the corresponding app.

The parameters all correspond to the equally named MX_SHELLEX parameters, which see for specifications. Only the deviations/extensions from the MX_SHELL parameter descriptions are noted below. Also note that the order of the first two parameters is reversed from MX_SHELLEX, reducing the minimum syntax to a single parameter.

objectspec  (String)  [in]

File or URL to launch. Unlike MX_SHELLEX, the file spec may be in AMOS format; the routine will figure out if it is relative to the server or the client. If on the server in an ATE or ZTERM connection, file will be transferred to the client for launch using ATEAPX.SBX.

status  (Num)  [out]

Combines status codes returned by MX_SHELLEX, with those of ATEAPX.SBX—which is used for file transfer if necessary—and adds a few more. The best reference, both for documentation and actual program usage, is the function Fn'Shell'Exec'Status'Description$() in FNSHELLEX.BSI in SOSLIB:[907,10].

action, parms, dir$, showflag, waitflag, exitstatus

same as for MX_SHELLEX

clisvr  (String)  [in]

Similar to MX_SHELLEX usage, except that if omitted or blank, the routine will attempt to figure out if objectspec is a file on the server or client. If the application knows the object is on the client PC, it can set it to "C" (for client) to avoid the self-determination logic.

Comments

The fnshellex.bsi module (see link above) contains a convenient wrapper function Fn'Shell'Exec(objectspec$) for maximum simplicity, e.g.:

STATUS = Fn'Shell'Exec(objectspec$)

History

2017 January, A-Shell 6.3.1542:  Routine added to A-Shell.