CAL Program Execution Commands


CALL scriptname

DOS doscommand

EXEC wincommand

DDE ddecommand

LAUNCH filename

Program execution commands call up external processes and pass data to them. All require an argument, which may need multiple components.

CALL executes a specified CAL script. If the call is made from within another script, when the called script finishes executing it returns control to the caller. CALL must be followed by a scriptname, as described above.

DOS executes a DOS command line. Follow the DOS keyword with any string you might type at a DOS command prompt. If you do not type any arguments after the DOS command, you get an interactive command prompt window. You can use this feature to manipulate files, execute programs or batch files, get directory listings, format disks, etc. During execution of the command, a command prompt window appears on the screen; when finished, the window goes away and control returns to the calling script.

EXEC starts a Windows program and optionally passes it command-line arguments. Follow the EXEC keyword with any string you might use in the Program Manager's File Run command. This command starts a program, but does not return from it. To return to ChemFinder, you need to use Task Manager or click in the ChemFinder frame window.

DDE sends a Dynamic Data Exchange message to a specified application. Follow the DDE keyword with three arguments:

  • The service name--usually the name of the recipient application.
  • The topic name--a string recognized by the recipient, identifying the nature of the message. It is typically SYSTEM.
  • The command--an instruction to the service indicating what you want it to do.
Details of these components depend on the service you're addressing.

The table below shows examples of Program Execution Commands:

Command Action
CALL myscript execute script file located in scripts directory
DOS erase junkfile.dat execute DOS command to delete a file
EXEC notepad myfile.txt execute Windows program
DDE CHEM3D CFWIN "open benz.mol" send DDE message to qualified service

2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA