Is there a way to know when an application(activate by the shell command) is finish processing and wait for the user to make is choice.