I need to run 2 command lines in chess engine using the UCI protocol.
1- position fen "r1k4r/p2nb1p1/2b4p/1p1n1p2/2PP4/3Q1NB1/1P3PPP/R5K1 b"
2- go depth 10
The first line set the FEN position in the engine (stockfish). The second command the engine start to analyse the position and then give me an output.
In vb6 my code is this:
With CreateObject("WScript.Shell")
.Run "cmd /c start /b E:\UCI-Vb6\stockfish_9_x64.exe position fen "r1k4r/p2nb1p1/2b4p/1p1n1p2/2PP4/3Q1NB1/1P3PPP/R5K1 b" > E:\UCI-Vb6\out.txt", 1, True
End With
and runs perfectly, but if I try to send a second command it will go back to re-start the engine with no "memories" about the position I set up before.
I also try nesting the two commands with the "&" parameter but with the same result And also try using "cmd /k" but again with no success.