so I want to list a load of numbers like so in a batch menu; 1: xxxx-xxxx-xxxx-xxxx-xxxx 2: yyyy-yyyy-yyyy-yyyy-yyyy 3: zzzz-zzzz-zzzz-zzzz-zzzz the user presses 1,2 or 3 etc as the menu choice and I want the number to be put in to the clipboard for pasting, anyone know how? --------------------------- also, hsatrt, how do you stop it displaying the hstart icon on the taskbar?
After an command, will capture the return code . If you can echo an string or variable, this is code will copy to clipboard: Code: echo I'll copy this to the clipboard | clip or Code: echo Hello %USERNAME%, your OS Disk is: %SYSTEMDRIVE% | clip
Expanding on Josh's example you can then create a menu something like this Code: @ECHO off cls :start ECHO. ECHO 1. xxxx-xxxx-xxxx-xxxx-xxxx ECHO 2. yyyy-yyyy-yyyy-yyyy-yyyy ECHO 3. zzzz-zzzz-zzzz-zzzz-zzzz ECHO. ECHO. set choice= set /p choice=Select 1,2 or 3 and Press Enter: ECHO. if not '%choice%'=='' set choice=%choice:~0,1% if '%choice%'=='1' echo xxxx-xxxx-xxxx-xxxx-xxxx | clip if '%choice%'=='2' echo yyyy-yyyy-yyyy-yyyy-yyyy | clip if '%choice%'=='3' echo zzzz-zzzz-zzzz-zzzz-zzzz | clip
Clipboard Just stumbled on this forum and don't know if this question was ever answered but here is remedy. The easy way is to Hold the Ctrl key and press "C" twice, this will make the office clipboard the default temporary app into which you can save a max of 24 items. To enter a specific item simply follow the underlined tip & click on the desired item. NB Note if you add a 25th item the first one will be deleted. If you need any info about the Windows clipboard - like putting a shortcut on the desktop- just ask. Silver Fox.