You do don't ever need the third party expect brute-forcing tool to read input from the user.
printf "%s" "do something (Y/N)"
read -n 1 INPUT # To read one keystroke on bash
# If BASH isn't available, you can read a keystroke followed by enter key
read INPUT
If you just want to read an answer from your user, use Coronas Code.
As what I understood, you want to control another program - and you want to automate that - and you don't have the possibility to change the source of that code, then expect may be a last possible solution.
Here's the example, if you needed(German website. The example itself should should be no problem though.