Send command

Command group Flag affected Reversible Execute on client Platform(s)
Exchanging data YES NO NO Windows


Send command {text}


DDE command, Omnis as client. This command sends a command or a series of commands as text to the current channel.

The command-text syntax must conform to whatever syntax rules apply to the server program.

The DDE syntax dictates that the commands be enclosed in square brackets and Omnis attaches special meaning to them in strings. Therefore, it may be necessary to put the command text into one of the Omnis string variables.

The flag is set if the server accepts the command(s).

Syntax and errors

When you send commands to Omnis, the syntax is defined by the text shown in the method editor. You can enter scripts in Omnis, copy them to the clipboard and paste them into the client application. If the sent command returns an error to Omnis, the hash variables #ERRCODE and #ERRTEXT store the error code and message.


; put your command text into the character variable lString
Calculate lString as '[your command]'
Send command {[lString]} ;; send the command to the server
; else you can enter the command directly into the command parameter by doubling the
; first set of brackets; eg
Send command {[[releasecontrol]}
; Example
Set DDE channel number {2}
Open DDE channel {Omnis|Country}
If flag false
  OK message {The Country library is not running}
  Calculate lString as "Ok Message {Hi, this is DDE magic'}"
  Send command {[lString]}
  Send command {'Next'}
  Close DDE channel
  OK message {Update finished}
End If