# Script modules local to each window

**URL:** <https://forum.inductiveautomation.com/t/script-modules-local-to-each-window/963>\
**Category:** Archived Topics\
**Created:** [January 27, 2009, 2:45am UTC](https://forum.inductiveautomation.com/t/script-modules-local-to-each-window/963 "2009-01-27T02:45:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skenealy](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@skenealy](https://forum.inductiveautomation.com/u/skenealy)\
**Post date:** [January 27, 2009, 2:45am UTC](https://forum.inductiveautomation.com/t/script-modules-local-to-each-window/963/1 "2009-01-27T02:45:41Z")

</div>

It would be nice to have something like the global script modules, but local only to a window.

We often have multiple ways of triggering the same event, so everything just calls a global python script. For example, we have previous/next/refresh buttons that trigger some text parsing, so it’s much easier to have all three events call the same function than to copy and paste any time a change is made. Not only is it easier to keep track of functions that are specific to a window, but it avoids collisions if two windows are merged into the same project without requiring a naming convention to be established.

Thanks.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 27, 2009, 5:31am UTC](https://forum.inductiveautomation.com/t/script-modules-local-to-each-window/963/2 "2009-01-27T05:31:50Z")

</div>

Yeah, I’d go a step farther and say it would be nice to be able to add custom functions to any component, not just windows, and be able to call them like normal functions.
