Adding to what Bytespiller was saying, the dlg.GetMsg()
call will block until there is actually an event to return, or the window is closed.
Using timers on dialogs is fine and supported if you need the dialog to do something while it's open. i.e. The stuff in Jon's Dialog.SetTimer/Dialog.KillTimer example? post is completely fine.
Having things like OnStartup
events in script add-ins which run infinite loops and never return is definitely not supported (i.e. Lister title bar clock ) and could result in other scripts/events never being run, or Opus windows freezing, or the installer not shutting down Opus to install updates, and so on. Events should do things quickly and then finish, since something else that needs to happen may be blocked until they're done.