You can’t do this dynamically if that’s what you’re asking. You will need produce a list of alarm filters to use for each screen yourself, whether by hand, or your tags for each page might be located in their own folders (could work for pages that belong to an area with 1 page per area, but you’ll need to consider long term if they will remain 1 page), or it could be semi-automatically via a script that pulls out the device paths. You could technically copy the page’s XML and pull out tag paths from that…
To pull out the tag paths from the page XML, assuming they all have “/” in them, you could use this regex:
(?<=>)[\w\d ]+\/[/\w\d ]+(?=<)
E.g. "<str>Pigging/Pig Launchers/Red Line 1</str>"
(?<=>) # search for a '>' before the search result without including it in the result (positive lookbehind)
[\w\d ]+ # look for 1 or more of any character, number, or space character
\/ # escape special character '/' and search for 1 '/'
[/\w\d ]+ # look for 1 or more of a /, and character, number, or space character
(?=<) # search for a '<' after the search result without including it in the result (positive lookahead)
You can use the below script in the Script Console which uses the regex above to pull out the tags (again, assuming there is at least one “/” in the tagPath) from the XML copied to the clipboard (Shift+right click on the window and select Copy XML to Clipboard):
from java.awt.datatransfer import StringSelection
from java.awt.datatransfer import Clipboard
from java.awt import Toolkit
toolkit = Toolkit.getDefaultToolkit()
clipboard = toolkit.getSystemClipboard()
from java.awt.datatransfer import DataFlavor
contents = clipboard.getContents(None)
XML = readClipboard()
pattern = '(?<=>)[\w\d ]+[/][/\w\d ]+(?=<)'
tags = re.findall(pattern, XML)
for tag in tags: print tag