get the scrip called to retun value

December 17, 2010 at 17:59:12
Specs: Windows XP
how to get tghe scrip called to return a value

call %~DP0#A_RUN.CMD
if answer_A==1 (goto :aaaa)

call %~DP0#B_RUN.CMD
if answer_B==1 (goto :aaaa)

call %~DP0#C_RUN.CMD
if answer_C==1 (goto :aaaa)

call %~DP0#D_RUN.CMD
if answer_D==1 (goto :aaaa)

call %~DP0#E_RUN.CMD
if answer_E==1 (goto :aaaa)

call %~DP0#F_RUN.CMD
if answer_F==1 (goto :aaaa)

call %~DP0#G-A_RUN.CMD
if answer_GA==1 (goto :aaaa)

call %~DP0#G-B_RUN.CMD
if answer_GB==1 (goto :aaaa)

call %~DP0#G-C_RUN.CMD
if answer_GC==1 (goto :aaaa)

call %~DP0#G-D_RUN.CMD
if answer_GD==1 (goto :aaaa)

call %~DP0#G-E_RUN.CMD
if answer_GE==1 (goto :aaaa)

call %~DP0#H_RUN.CMD
if answer_H==1 (goto :aaaa)

call %~DP0#I_RUN.CMD
if answer_I==1 (goto :aaaa)

call %~DP0#J_RUN.CMD
if answer_J==1 (goto :aaaa)

See More: get the scrip called to retun value

Report •

December 17, 2010 at 20:55:58
There are two main options.

1. Have the called script echo a value and use a for /f loop to capture it.

2. Return a variable. This will only work if setlocal isn't used or all matching endlocal's are executed before setting the variable(you can use the way variables expand to make this work.

A third option would be to use a file or something similar to hold the value, but it's really not the best option.

Report •
Related Solutions

Ask Question