PM123 can be remotely controlled via a named pipe, \PIPE\PM123 by default. You can alter this default by the remote control settings of the properties dialog.
Named pipes were chosen because of their excellent features. Quoting from the Control Program Programming Guide and Reference: "Any process that knows the name of a pipe can open and use a named pipe. In addition, named pipe data can be transparently redirected across a network, such as a local area network (LAN)".
To remote control PM123 on the same computer, you can use either the built-in "echo" command, or the PM123 executable itself. PM123 understands a set of commands that are written to the pipe. For example:
[c:\usr\pm123] pm123 -cmd volume 80
[c:\usr\pm123] echo *volume 80 > \pipe\pm123
These commands will set the volume to 80%.
[c:\usr\pm123] pm123 -cmd add d:\music\test.mp3
[c:\usr\pm123] echo *add d:\music\test.mp3 > \pipe\pm123
These commands will add the file d:\music\test.mp3 to the default playlist.
If you use echo, remember to prepend any commands sent to it with an asterisk *.
Now for the cool part. You can control PM123 over your OS/2 Local Area Network. Just use \\SERVER\PIPE\PM123. \\SERVER is the name of the computer PM123 runs on. For example,
[c:\usr\pm123] pm123 -cmd \\mycomputer volume 80
[c:\usr\pm123] echo *volume 80 > \\mycomputer\pipe\pm123
[c:\usr\pm123] pm123 -cmd \\mycomputer add d:\music\test.mp3
[c:\usr\pm123] echo *add d:\music\test.mp3 > \\mycomputer\pipe\pm123
Will do the same as examples above, but from a different computer. Easy, isn't it?
If you need to get some reply, for instance a success indicator or the result of a query command, then you need to use bidirectional pipe communication. See the REXX example file 123remote.cmd shipped with PM123.
See the command reference for more details.