Starting External Applications

Previous Next

See Also

One of the actions that you can use in an action task is the USoft CommandWindows() method, which can run any command allowed by Windows.


The command in the CommandWindows() action must have an EXE, COM, BAT, or PIF extension.

Suppose the Travel Agency wants to issue a mailing to all its customers. This could involve the exporting of the data, followed by the automatic startup of the word processor to organize the data into separate letters to each customer. Assuming that the data has been exported by a previous task, into a file called MAIL_JAN.TXT, then the action to start Microsoft Word and read the file would be:


Another example, to run a Windows batch (.BAT) file is:

CommandWindows('makeall.bat', 'april.txt')

As you can see from these examples, the arguments of actions may contain strings.

When a job is run in the USoft environment, the arguments of an action may also contain references to on-screen fields, and concatenation operators (||, +, and so on). For example:

CommandWindows('''mybatch.bat',`'' ||:NAME|| '' ''||:TIME')

In this example, NAME and TIME are the names of the fields in the application.