system.perspective.sendMessage() function

Some further discussions that might help you:

https://forum.inductiveautomation.com/search?q=%40pturmel%20system.perspective.sendMessage%20scope%20session%20order%3Alatest

See especially this alternate approach to such problems that better fits a highly multi-user multi-tasking platform like Ignition: