Page 1 of 1

Help with menu

Posted: 21 Feb 2022 11:04
by pedrodalterio
Hello everyone, im new here, so i don't know if i posted on the right place, sorry if i didn't.

The thing is, i have my menu in a bat and i works fine but i want to make the choice open in a new window insted on same window

Code: Select all

c:\scripts\cmdMenuSel.exe F870                                                                                                                                                                                                                                                                  "                                  |   Ferramentas Windows   |"                                                                                                                                                                                                                                       "                                  |   Rede e Mapeamentos    |" 																		      "                                  |   Suporte               |"                                                                                                                                                                                                                                                 "                                  |   Utilitarios           |"                                                                                                                                                                                                                                                 "                                  |   Sair                  |"
if %ERRORLEVEL% == 1 goto ferramentaswin
if %ERRORLEVEL% == 2 goto redemap
if %ERRORLEVEL% == 3 goto sup
if %ERRORLEVEL% == 4 goto utilitarios
if %ERRORLEVEL% == 5 exit

REM inicio do FERRAMENTASWIN
:ferramentaswin
@echo off
mode 58, 18
c:\scripts\batbox.exe /g 0 1
echo %HORARIO%
exemple, above i have a menu select and when i select "Ferramentas Windows" it goes to :ferramentaswin... and it works, i just want it to pop in a new windows and preserve my initial menu, is it possible?

Re: Help with menu

Posted: 22 Feb 2022 09:42
by T3RRY
You mean something like this?
viewtopic.php?t=6581

Re: Help with menu

Posted: 24 Feb 2022 15:33
by pedrodalterio
something like it... i think i solved my problem
Image
i've added this if on the begining of the bat

Code: Select all

@echo off
if [%1] EQU [] (
goto menu 
) else (
goto %1 
)
)
and edited the ifs on errorlevels to call the label inside the own file

Code: Select all

if %ERRORLEVEL% == 1 (
cls
start cmd.exe /k call "c:\scripts\carregar.bat" ferramentaswin 
goto menu
)
kinda worked the way i wanted, don't know if there's another way to do it, probably yes :D