• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Sending keys to a DOS window

Started by Blonde Guy, 2008.03.26, 01:56:08

Previous topic - Next topic

Blonde Guy


I've got a situation where I have a DOS program running in a DOS Window, and I
want to send it function keys, like F2.

I'm remote controlling it using VNC, and the windows VNC client cannot send function keys.

Can I run an OS/2 application to send function keys to the DOS Window?
Expert Consulting for OS/2 and eComStation

RobertM

Hi,

IF I understand you correctly, you are running the DOS Window in an OS/2 environment that is being connected to via VNC.

So... if my understanding is correct (and the VNC client does not have some weird modifier/menu option to send function keys), then you could probably accomplish this using (yeah, my fav) REXX. There is a REXX DLL that is supposed to be designed to send keystrokes to such windows - and IIRC I found the link to it in REXX Tips and Tricks or Hobbes (I'd try RT&T first - that feels more like it was where I saw it).

It would require a little bit of scripting, and some method of selecting the correct window to "inject" the keystrokes into, but shouldnt be too unweildly for minimal to moderate FN key use. You should be able to send the FN keys to the program using any such utility that will accept kybd scan code info as well.

The application in and of itself shouldnt need to be more than a few lines (maybe a couple dozen).

The other alternative (though I have not tried it for such things), is if this is an eComStation machine, try the VNC software that comes with it, and access the machine via a browser - it might support sending function keys, but again, I have not tried it more than a handful of times, and never tried sending function keys.


A final option (which someone else would need to comment on - because I am not sure if it would work), is to see if the SysMenu for a DOS Window could be expanded... in which case, you should be able to add options to inject each function key into the DOS session... dunno though if that menu is modifiable.


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Saijin_Naib

AFAIK, the newer VNC viewer (Free) from RealVNC does send function keys, and I think the VNC server built into eCS can recieve. Try it again?

melf

/Mikael

Blonde Guy

Thanks for the advice.

None of the machines available to run the VNC client run OS/2 or Windows, so I can't use PMVNC, which sends keystrokes just fine.

I have to use a Windows VNC client that both plays ball with the OS/2 VNC server, and sends keystrokes like F2.

It's a bit frustrating to get VNC to the point where WinVNC 3.3 can control the OS/2 box and the DOS application, and then fail because I can't get an F2 to the DOS window.

The new client from RealVNC won't play with the OS/2 VNC server, because compatibility mode on RealVNC is broken. I'll see if I can get the windows users to try harder with RealVNC.

The REXX DLL sounds like the way to go, but I'm having trouble figuring out which is the right one.
Expert Consulting for OS/2 and eComStation