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

how to @SELECT redirected input?

Discussion in 'Support' started by Stefano Piccardi, Feb 22, 2011.

  1. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    Does %@SELECT work with redirected input? According to the help file it should, but I can't get it to display the selection window. I tried

    alias | %@select[CON:,0,0,24,70,exec alias,1]
    echo %@select[CON:,0,0,24,70,echo] < updater.ini

    also replacing CON: with "CON" "@CON" upper and lowercase didn't work.
    What am I missing?

    echo %@select[updater.ini,0,0,24,70,echo] does work on my system.
     
  2. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    309
    Likes Received:
    0
    Hallo Stefano Piccardi,



    Don't know what you want to do. Something like this works:

    text | set dummy=%@select[con,5,5,20,15,Drive]
    A:\
    B:\
    C:\
    D:\
    E:\
    F:\
    E:\
    endtext

    Best regards,

    * Klaus Meinhard *
    <www.4dos.info>
     
  3. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    Thank you, it works here too. "con" vs. "con:" makes the difference. It could be considered as a bug since the help file says:
    To select from lines passed through input redirection or a pipe, use CON: as filename. To select from lines in the Windows clipboard, use CLIP: as filename.
    Topic "f_select.htm" last edited 1/14/2009. ©2011 JP Software, Inc.
    Keywords: @SELECT,SELECT

    and CON works while CON: doesn't
    while CLIP doesn't work while CLIP: does.
     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    ---- Original Message ----
    From: Stefano Piccardi
    | Thank you, it works here too. "con" vs. "con:" makes the difference.
    | It could be considered as a bug since the help file says:
    | To select from lines passed through input redirection or a pipe, use
    | CON: as filename. To select from lines in the Windows clipboard, use
    | CLIP: as filename.
    | Topic "f_select.htm" last edited 1/14/2009. �2011 JP Software, Inc.
    | Keywords: @SELECT,SELECT
    |
    | and CON works while CON: doesn't
    | while CLIP doesn't work while CLIP: does.

    ... and in most contexts the ":" after CON is not required, e.g.:

    command | for %x in (@CON) ...

    --
    Steve
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,280
    Likes Received:
    38
    CLIP: isn't exactly a parallel case. It's not an actual Windows device, so CLIP (without the colon) is a perfectly legal filename, and should not be handled specially.
     

Share This Page