GRitchie Posted November 20, 2014 Posted November 20, 2014 Hi, I'm trying to write a script with user input, then that user input determines an outcome. Let me show you the Pseudo: set imageScript = Which image would you like to run? if /i %imagescript% ISEQUALTO STAFF goto loadStaff if /i %imagescript% ISEQUALTO PUPIL goto loadPupil if /i %imagescript% ISNOTEQUALTO PUPIL OR STAFF goto quitScript I also would like to open the scripts as start maximised (I know this isn't fully maximised in windows 7 but it's a bigger screen fill) So far, the actual code I have is as follows - but it doesn't seem to work! @echo Offcls Color 0b @echo Options: STAFF, PUPIL, NONE set /P imageScript=Which image script would you like to run? IF /I %imageScript%==STAFF GOTO :loadStaff IF /I %imageScript%==PUPIL GOTO :loadPupil IF /I %imageScript% NEQ "PUPIL" "STAFF" :loadNone :loadStaff call "\\location\IT\Imaging\STAFF-IMAGE.bat" :loadPupil call "\\location\IT\Imaging\PUPIL-IMAGE.bat" :loadNone exit
sted Posted November 20, 2014 Posted November 20, 2014 should give you a working menu to play with @break OFF @echo OFF cls @echo off goto menu :menu echo. echo Internet Settings? echo. echo Choice echo. echo 1 Use Internet in School echo 2 Use Internet At home echo 7 Quit echo. :choice set /P C=[1,2,7]? if "%C%"=="7" goto quit if "%C%"=="2" goto home if "%C%"=="1" goto school goto choice :school echo school internet selected goto quit :home echo home internet selected goto quit :quit pause exit :end
GRitchie Posted November 20, 2014 Author Posted November 20, 2014 should give you a working menu to play with Awesome! This worked perfectly with a few adjustments to suit me! Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now