I would appreciate a piece of advice. I have a GUI application. I am able to listen to events (answers from a geodetic instrument) when there is a process running in my application (e.g. measurement). But how to listen to events when the application is idle (no matlab activity currently active, no function running, no button pressed). Is there a function (to where write definition of listening to events) which is active when aplication window rises (program starts) and active until it is closed?