Run script after requesting input to port 8097

Hi friends , Please help me write the script : Run script 123 after requesting input to port 8097