:Reflect Command [REFLECT]
Executes a Reflection command on your PC. Qedit checks whether the command succeeds or fails. :Reflect allows you to control a PC from within your Qedit Usefiles and shell scripts (send and receive files, backup your PC, execute PC programs, etc.).
:REFLECT reflection command
(Defaults: none)
Examples
/reflect type mreport.crt
/reflect shell lotus
Version of Reflection
The :Reflect command depends on Reflection's ability to accept commands using an escape sequence, and to be able to pass back a status code indicating whether the command succeeded. These features are implemented in the following versions of Reflection:
- Reflection 1 for DOS version 1.40 or later
- Reflection 3/7 for DOS version 1.55 or later
- All versions of Reflection for Windows
- All versions of Reflection for Macintosh
Debugging PC Errors
If the :Reflect command fails, Qedit will display the Reflection error-\code. For an explanation of Reflection error-\codes, refer to the Reflection Command Language reference manual.
Using Line Mode
Some Reflection command files work fine when executed from the Alt-Y command line, but fail (possibly leaving your terminal in a locked state) when invoked with Qedit's :Reflect command.
The reason is that Qedit's :Reflect command sends an escape code to Reflection to invoke the command. Then Qedit waits for Reflection to send back a status code to indicate when the command is finished. While Qedit is waiting for the result code from Reflection, it isn't capable of executing other Qedit commands -- it's already executing a Qedit command! The only thing that Qedit is capable of doing while it's waiting is to execute any shell commands that Reflection might send to the HP 9000. The reason shell commands must be accepted is that Reflection sends a command to run unxlink2 whenever a file transfer is requested.
As long as the command or command file doesn't attempt to transmit any data to the HP 9000, :Reflect will probably work the same way as Alt-Y.
For example, here is a Reflection command file that works from Alt-Y, but not from :Reflect.
; EXIT.RCL
; This command file gets me out of Qedit, logs me off
; the HP 9000 and exits from Reflection.
;
transmit "exit^M"
wait 0:01:00 for "[no]:"
transmit "yes^M"
wait 0:01:00 for "$"
transmit "exit^M"
wait 0:01:00 for "terminated>"
wait 0:00:05
hardexit
Also see the chapter "Qedit Issues and Solutions" for more information.