GN4 add-ins scripts are context dependent. It means they're are accessible only from an appropriate context, and may not work from other contexts.
GN4 contexts
There are two main GN4 contexts:
•Application context (document not loaded)
When no document is loaded, e.g. page or article, it means you are in the Application context. The scripts stored in Ted.vb, Fred.vb, Shell.vb, EdAdminvb, Admin.vb are accessible from the application context.
•Designer context (document is loaded)
When a document is loaded, e.g. page, edition, article, it means you are in the Designer context. The scripts stored in Article.vb, Page.vb, PageAutomation.vb, Edition.vb, Ads.vb and PubDest.vb. are accessible only from the Designer context. But, note that in the Designer context are accessible also all scripts stored in Ted.vb, Fred.vb, Shell.vb, EdAdminvb, and Admin.vb.
An example:
An "open document" script should work if no document is loaded, but also when a document is loaded. So, it should be stored in the Application context. A "move frame on the page" script is supposed to work when a page is loaded, so it should be stored in the Designer context.
Inheritance
Add-ins are linked to each other also by inheritance, and the inheritance is following:
•Fred4 add-ins inherit all from Ted4 and Shell, thus Fred4 can use methods and properties defined either in Fred4, Ted4 or Shell.
•Ted4 inherits all from Shell, thus Ted4 can use methods and properties defined in Ted4 and Shell.
•Shell can use methods and properties defined in Shell.