1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

INKEY observations

Discussion in 'Support' started by vefatica, Apr 23, 2009.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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)
    
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    vefatica wrote:

    Yes.


    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
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    vefatica wrote:

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

    Rex Conn
    JP Software
     

Share This Page