Page 1 of 1

Popup Screen Open Status

Posted: Wed Jul 04, 2018 2:19 am
by artistmonkey
Is there any way to check popup screen is opend or not by scripting without using any tag?

Re: Popup Screen Open Status

Posted: Tue Sep 11, 2018 9:03 am
by Russ C.
You could use global variables in scripting to keep track, but that is essentially a tag, and tags might be easier.
But there isn't a method that you can access for that information like

Code: Select all

if(PopupScreen1.IsCurrentlyOpen())
{
     //Do something
}

Re: Popup Screen Open Status

Posted: Wed Feb 06, 2019 4:42 am
by liestol
If there are no available methods to this, a quick hack would be something like this I would assume:

- make a internal boolean tag popupOpened
- set popupOpened to true in popup_Opened()
- set popupOpened to false in popup_Closed()

Code: Select all

void Screen1_Opened(System.Object sender, System.EventArgs e)
{
	Globals.Tags.popupOpened.Value = true;
}
		
void Screen1_Closed(System.Object sender, System.EventArgs e)
{
	Globals.Tags.popupOpened.Value = false;
}
You can as Russ mentioned do this by using global variables as well, any reason why you don't want to use a tag to do this?