EDITED 27/7/2014
PLEASE READ CAREFULLY AS MY QUESTION IS A BIT COMPLICATED
Hi, I wanted to do a coding whereby it involves a JAVA GUI, batch
You can write a Java program and use Scanner to take input from user:
Scanner in = new Scanner(System.in);
You can invoke this program from a batch file using following command:
@ECHO OFF
%JAVA_HOME%\bin\java MyClass
Have given you pointers and leave rest to you to figure out.
Cheers !!
Change this line:
if %choices% equ 6 set choices=1,2,3,4,5
by this one:
if "%choices:6=%" neq "%choices%" set choices=1,2,3,4,5
I also suggest you to use arrays.
EDIT: Example added
@echo off
:getOptions
set "choices="
set /P "choices=Choices: "
if not defined choices goto :EOF
if "%choices:6=%" neq "%choices%" set choices=1,2,3,4,5,6
echo Execute: %choices%
goto getOptions
Example output:
C:\> test.bat
Choices: 1,3,5
Execute: 1,3,5
Choices: 1,2,4,6
Execute: 1,2,3,4,5,6
Choices: 1,6
Execute: 1,2,3,4,5,6
Choices:
EDIT: I obviously made the error of also include 6 in the replacement, but you get the point!