Quote:maybe is applied Properties > Macro > If running.Executing the code in a macro doesn't work — it must be a function. I tested it in a macro without success, but it worked after converting it into a function.
Thanks for your help.
The issue has been resolved — the flags parameter in OnScreenDisplay needs to include the flag 2 to make the function execute synchronously.