What happens after a screen's actions have completed

In a macro, after all actions for a screen have been processed (including sleeping after all actions based on the pausetime or pause attribute value), the nextscreen is registered and a timer (timeout clock) is started. The macro attempts to recognize the screens at the time of registration and, if no screen is recognized, starts an iterative recognition process for the nextscreens, which is triggered by PSEVENTs and OIAEVENTs generated by data coming in from the host. Each time a PSEVENT or OIAEVENT arrives from the host, the macro tries to recognize the nextscreen again.

The screen recognition process continues to try to recognize the incoming screen data. It might fail several times before succeeding (messages are not logged for these failures). The timeout parameter for the macro sets an upper limit on how long each screen's recognition process (not the whole macro) will try to recognize the incoming screen. Note that the screen recognition engine is not in a "busy" loop. The engine waits to be triggered by incoming PSEVENT and OIAEVENT occurrences to do each additional comparison. If the timeout value is exceeded before the screen is recognized, screen recognition fails. The timer is stopped when a screen is recognized.