PICKLIST
A visual list selection accessory for use in batch scripts

1 Categories:

visual accessory, batch script selection accessory

2 Usage:

 PICKLIST Caption,Choice1,Choice2,etc.

Or:

 PICKLIST Caption,/Cliptext

3 Arguments:

4 Returns:

5 Description:

The PICKLIST accessory is used in batch scripts. Choices are presented to the user using a standard Windows list. The user's selection is returned for subsequent processing by batch ERRORLEVEL requests.

6 Buttons:

7 Remarks:

Text can be added to the clipboard by using the CLIPARGS program.

File contents can be added to the clipboard by using the CLIPIN program. The output of another program can be piped to the CLIPIN program.

8 Examples:

  1. In a batch script:

    start /w picklist magic words,abra ca dabra,open sesame,shazam

    if errorlevel 3 goto :shazam

    if errorlevel 2 goto :opensesame

    if errorlevel 1 goto :abracadabra

    echo you pressed cancel

    goto :quit

    :shazam

    echo you selected 'shazam'

    goto :quit

    :opensesame

    echo you selected 'open sesame'

    goto :quit

    :abracadabra

    echo you selected 'abra ca dabra'

    :quit

  2. In a batch script:

    clipargs abra ca dabra\nopen sesame\nshazam

    start /w picklist magic words,/C

    if errorlevel 3 goto :shazam

    if errorlevel 2 goto :opensesame

    if errorlevel 1 goto :abracadabra

    echo you pressed cancel

    goto :quit

    :shazam

    echo you selected 'shazam'

    goto :quit

    :opensesame

    echo you selected 'open sesame'

    goto :quit

    :abracadabra

    echo you selected 'abra ca dabra'

    :quit

  3. In a batch script:

    args "abra ca dabra" "open sesame" shazam | clipin

    start /w picklist magic words,/C

    if errorlevel 3 goto :shazam

    if errorlevel 2 goto :opensesame

    if errorlevel 1 goto :abracadabra

    echo you pressed cancel

    goto :quit

    :shazam

    echo you selected 'shazam'

    goto :quit

    :opensesame

    echo you selected 'open sesame'

    goto :quit

    :abracadabra

    echo you selected 'abra ca dabra'

    :quit

9 See also:

clipargs,

clipin,


A Kilowatt Software AuroraWare!(TM) Program.
Version 1.0
Copyright © 2000-2014
All Rights Reserved.
Web: http://www.kilowattsoftware.com/
E-Mail: support@kilowattsoftware.com

Last updated on: 4 Mar 2011