Error executing script.
Traceback (most recent call last):
File "tagevent:alarmActive", line 3, in alarmActive
File "module:GlobalScripts", line 188, in alarmact
AttributeError: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'gui'
So its basically saying system.gui does not work in the project library scripts? is there another way to do this?
But what is calling the project library function in (2)? i.e. what is calling "alarmActive"? Looks like this is coming from a tag change event? in which case this is running in the gateway scope which doesn't know about Vision, hence no gui functions will work
They can, under some circumstances. It isn't whether you are calling from a project script, but what ultimately called the project script. Project scripts are present in gateway scope (by project), designer scope, Vision client scope, and Perspective scope (a variant of gateway scope). But the contents of the system library varies by calling scope.
Interacting with other execution scopes involves messaging. Project scripts are not a scope in and of themselves.
The system.gui.* and system.nav.* functions exist in Vision Client scope, and Designer scope when Vision is installed.
You need to monitor that alarm tag (.../Alarm tags/Alarm Active) in the clients e.g. in a Vision Client Tag, and open your popup from there, assuming I'm interpreting what you're trying to do correctly. I.e. open a popup when an alarm activates (you haven't given any detail about what you're actually trying to achieve)