From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McCarty Subject: Re: piping escape into dosemu Date: Mon, 08 Mar 2010 17:07:52 -0600 Message-ID: <4B958348.4050802@sbcglobal.net> References: <4B918324.6000308@sbcglobal.net> <4B94B24E.4070804@sbcglobal.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: FreeDOS TW wrote: > Hi Mike, > > thanks for your patience. I'm sorry if my wording was confusing - > English is not my mother tongue. No problem. > It appears the following problem is equivalent to mine, but simpler to > describe because it neither involves pipes nor echo: > > Say I have a DOS program that shows kind of a splash screen which can > be bypassed by hitting ESC. (This is just an example.) I'd like to > automate this, so I start dosemu like > > dosemu -input 'thedosapp.exe\r\^[' > > because in the readme[1] I'm told that "\^[" is the syntax for the > escape key. At least that's how I interpret the "\^x" section. Ok, we have a use/mention problem, I think. In your example, you give a string enclosed in 'single quotes'. That string, as you show it, should have two characters after the '\r'. I suspect that you are typing three characters '\', '^', and '['. That is not the intended action. What is intended is that you type a BACKSLASH ('\'), and an ESC. The shell displays on your screen two characters when you type ESC, but that is a single keystroke. You may have to type ESC twice to make it work with your shell. In any case, you should not be typing the '^' and '[' characters; those are just how the shell displays the input on the screen. > Unfortunately, this doesn't work. So what's the syntax for the escape > key? I tried to find hints in the source code, but my C know-how is The ESC key. You may, as I said, have to type it twice. I had to. > pretty basic. All I figured out is that the uhook_keystroke() > function in dosemu/src/base/misc/userhook.c must be the function that > handles the keystroke command. Well, let's hope that gets you going! Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I speak only for myself, and I am unanimous in that!