Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

INKEY observations

May
12,846
164
I suppose starting INKEY's unquoted prompt with a / is a no-no (trying to make an option out of it).

Code:
inkey /m /x /prompt/ %%key
TCC: (Sys) The parameter is incorrect.
 "prompt/"
Usage : INKEY [/C /D /K"keys" /M /P /Wn /X] [prompt ] %%varname
But this one, first observed by Stefano Piccardi, causes no error message, high CPU use, and is uninterruptible:

Code:
inkey /m /x /%char[27]/ %%key
Either of these (below) sort of work except that the prompt isn't seen until **after** the mouse click!


Code:
inkey /m /x ^e %%key

inkey /m /x  ← %%key  (Esc entered with Alt0255-Esc)
 
vefatica wrote:

> I suppose starting INKEY's unquoted prompt with a / is a no-no (trying to make an option out of it).

Yes.


> Either of these (below) sort of work except that the prompt isn't seen until **after** the mouse click!
>
> Code:
> ---------
> inkey /m /x ^e %%key
>
> inkey /m /x ↠%%key (Esc entered with Alt0255-Esc)
> ---------

WAD -- you probably have ANSI output enabled, so TCC can't tell that you
want to print a (useless?) escape character instead of starting an ANSI
sequence.

Turn off ANSI if you want to print escapes.

Rex Conn
JP Software
 
On Sun, 26 Apr 2009 21:37:28 -0500, rconn <> wrote:

|WAD -- you probably have ANSI output enabled, so TCC can't tell that you
|want to print a (useless?) escape character instead of starting an ANSI
|sequence.
|
|Turn off ANSI if you want to print escapes.

Yes I do have ANSI output enabled. Can INKEY's prompt use ANSI escape sequences
(if done correctly)?
--
- Vince
 
vefatica wrote:

> On Sun, 26 Apr 2009 21:37:28 -0500, rconn <> wrote:
>
> |WAD -- you probably have ANSI output enabled, so TCC can't tell that you
> |want to print a (useless?) escape character instead of starting an ANSI
> |sequence.
> |
> |Turn off ANSI if you want to print escapes.
>
> Yes I do have ANSI output enabled. Can INKEY's prompt use ANSI escape sequences
> (if done correctly)?

Yes -- all output from all commands (except for direct screen writes
like SCRPUT) can use ANSI sequences.

Rex Conn
JP Software
 
Back
Top