Qedit

Run Qedit for Windows From Host Sessions

By Hans Hendriks, Robelle Technical Support

Recently Robyn Rennie posted an article on how she invokes Suprtool from within Qedit for Windows to test her Suprtool host code.

Here's a way to do the reverse: Invoke Qedit for Windows from a terminal emulator. Consider the following command file.

QW.CMD

parm fname=" "
anyparm conname = abc
if "!conname" = "abc" then
  if not bound(convar) then
     echo "You must specify a connection to use"
     return
  else
     echo Using Connection: !convar
  endif
else
  setvar convar,"!conname"
  echo Connection name "!convar" set
endif
echo ^&oF SHELL C:\robelle\qedit\qwin32.exe "!convar:!fname"
(Note, the "^" caret denotes an escape character)

This command file accepts 2 parameters: a Filename, and a Connection Name. The first time you invoke it, you must specify a connection name. Subsequent invocations will default to the previous connection used, so you need only specify a filename. e.g.

   QW diary Production home

... will use a the connection called "Production home" to open the file called "Diary". Thereafter:

   QW olddiary

...will use the same connection name, and open "olddiary"

To edit files on another connection, just specify the new connection to use:

   QW cob229 Dev source

(Open file "cob229" on connection "Dev source").

Here's how it works:

The esc&oF causes the string that follows to be passed to the terminal emulator as a command.

SHELL tells the terminal emulator to pass what follows to the operating system as a shell command

C:\robelle\qedit\qwin32.exe "!convar:!fname" is the command that invokes Qedit for Windows, passing a connection and filename to edit

Caveat: We've tested this with the Reflection terminal emulator. To the best of our knowledge, it should work with the Minisoft emulator too, but this remains untested.

I just had another idea.....

The connection name is stored in a variable called "convar". If you mainly use one connection with Qedit for Windows, you can pre-load the variable with your connection name as part of your regular logon procedures/UDCs. Alternatively, you could standardize that all your user's setup a Qedit for Windows connection matching their Session name, then setup a logon UDC that does:

   setvar connvar,!hpjobname

To read more Qedit for Windows tips, visit this compilation.

hans.henriks@robelle.com
December 9, 2000