My point is that if you need to respond to a LISP prompt from a Script, the response cannot be in the LISP routine, it must be part of the Script; hence moving the commands within your LISP routine will have no effect on the outcome.
Instead, a better approach is to either:
Develop an entirely autonomous LISP program which requires no user input and can therefore simply be loaded & run.
OR
Remove all of the command calls from your LISP program and perform these from the Script instead.