Page 1 of 1

Determine alias version of screen

Posted: Wed Sep 12, 2012 1:50 pm
by AMitchneck
I have a screen which displays information about several machines depending on which alias is loaded. How can I determine which alias is currently loading in scripting? I have some background script which changes is job priority based on which machine you are actively looking at (to reduce update delays, etc.).
Along this note, I would like to add a 1/2/3/... at the top of the screen to indicate which machine number is actively being watched.

Thank you.

Re: Determine alias version of screen

Posted: Thu Sep 13, 2012 9:01 am
by mark.monroe
You can get the alias instance currently loaded on a screen by doing the following.

Code: Select all

string instanceName = this.InstanceName;
You would need to figure out how you want to trigger the above code. I would trigger when you change the screen alias.

To change the alias instance a screen is using.

Code: Select all

//Instance1 is the instance I want my screen to use
Globals.Screen1.Instance1.Show();