Get the name of current screen


Inside a Screen Script I would like to be able to find the name of the Screen. This will be done automatically and not by typing the name in a string variable.
Is it possible?
  • Hello @Bjarne

    You need to keep track of the screen names by assigning the string of the screen name into a string tag in the Screen_OnOpen() section of your screen script such as:

    $ScreenName = "Main"

    Richard Clark
    InduSoft TMS
  • Hi Bjarne,

    There's not a way I'm aware of that would prevent you from having to manually type in the screen like Richard suggested, although I think with a little bit of scripting in the Graphics script you can set up everything in one place. 

    The pertinent question is what specifically are you trying to do? If you want a log of the screens as they're opened, you can do that easily with the event logger. 

  • P.S.

    You can see how this is implemented by looking at the PCDemo application included with your InduSoft installation.  Each Screen is named and stored so that it can be opened in a treeview object and also so that the "open" screen name will appear in the Header screen.

    Richard Clark

    InduSoft TMS