Display title on multiple screens


I am using Vision in my project and I am trying to display the screen title of the selected screen on each monitor.

I have 3 monitors where the operator can select a different screen on every monitor. On top of this several clients can be active, but on different monitors.

My solution now is that I read what parentWindow that is active and save this to a Client tag. But this affects all monitors at each client, so the monitor that have been used last, sets the title for all monitors and not just the monitor where the screen is selected on.

Right now, I am using this script to open screens on the monitors by one client:

 # This script will open multiple screens, and place the screens on each monitor. 
  # As it is iterating through screens, it is important that the main screen is on index 0. 
  # This can be viewed in "Windows start -> settings -> display". 
  # Get the screen information for all of your monitors.
  screensDataset = system.gui.getScreens()
  # Open the first window of the project in screen 0 of windows.
  screenIndex = screensDataset[0][0]
  monitorNum = screenIndex + 1
  primaryScreenText = 'This is Monitor %d' %monitorNum
  system.nav.swapTo('12_Home/00_Home', {'Display':primaryScreenText})
  # Step through all of the screen information, starting with index 1 instead of 0.
  for screenDetails in screensDataset[1:]:
      # unpacks the tuple that is returned for each of the monitors present. Consists of screen index, width, and height of the screen.
    screenIndex, screenWidth, screenHeight = screenDetails
    monitorNum = screenIndex + 1
    screenText = "This is Monitor %d" %monitorNum
    # Open an empty frame on the next monitor.
    # Assign a handle and apply the width/height for the monitor you are opening on
    handleName = "Monitor %d" %monitorNum
    system.gui.openDesktop(screen=screenIndex, handle=handleName, width=screenWidth, height=screenHeight)
    # Open the Main Window on this new desktop and pass the parameters needed.
    system.nav.desktop(handleName).swapTo('12_Home/00_Home', {'Display':screenText})
    system.nav.desktop(handleName).openWindow('Top bar')

Thanks in advance

– Benjamin

There you go