Alternatives to the (obsolete) @execstr function

#1
In reference to this post here are some alternatives to the (obsolete) @execstr function;

Code:
echo Yes^NNo |! echo %@line[con,1] |! set /p results=

echo %results
No
Code:
type "%_ininame" |! echo %@line[con,10] |! set /p results=

echo %results
BeepLength=2
Code:
tasklist.exe |! echo %@line[con,4] |! set /p results=

echo %results
System                           4 Services                   0        428 K
Code:
pshell /s "$X = tasklist.exe | select -index 4" && echo %@pshell[$X]
System                           4 Services                   0        464 K
Joe
 
#2
echo Yes^NNo |! echo %@line[con,1] |! set /p results=
echo %results
No
The help is not very keen on SET /P. You could also

Code:
echo Yes^NNo |! echo %@line[con,1] |! input %%results


echo %results
No
But I don't think of @EXECSTR as obsolete? Compared to the above, it seems like an innovation. It seems to do a better job of hiding ugly details and it's more readable.

Both amount to the same thing ... put the text in a temp file and set results to the second line of that file.