This is activated whenever an exec'd process displays a "prompt". A "prompt" is defined as any line of output from a process that doesn't end in a carriage return - line feed. The parameters are:
$0 Process number or logical name (if assigned). $1 The prompt string.