Action for printing messages and optionally setting a new action.
The messages indices to print.
The new action to set. Null if none.
The new action class to set. Null if none.
Action for printing messages and optionally setting a new action.