Please enable JavaScript to view this site.

A-Shell Development History

This subroutine has been added to the standard A-Shell distribution package so as to provide a standardized 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.

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

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  (str)  [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 the new SOSLIB fnshellex.bsi [https://bitbucket.org/microsabio/soslib/src/bb6659e417127151e863126f35cf6213cba5ccce/907010/fnshellex.bsi?at=default&fileviewer=file-view-default] function.

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

same as for MX_SHELLEX

clisvr  (str)  [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 new 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$)