# Ignition Perspective - Script Project

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 26, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554 "2023-06-26T20:25:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lautaro\_Cides](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@Lautaro\_Cides](https://forum.inductiveautomation.com/u/Lautaro_Cides)\
**Post date:** [June 26, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554/1 "2023-06-26T20:25:08Z")

</div>

Is it possible to create a script in "Scripting/Script Project" and call it from some kind of perspective component? Scripting is a paid module?  
On the other hand, could I create custom libraries on the Ignition installation site and call them from perspective?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 26, 2023, 8:32pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554/2 "2023-06-26T20:32:25Z")

</div>

> [@Lautaro\_Cides](#):
>
> call it from some kind of perspective component?

Yes, standard functionality. Simply create functions in script modules in your project's scripting library. You won't even have to use jython's `import` to use them.

> [@Lautaro\_Cides](#):
>
> Scripting is a paid module?

Only for pure gateway scope on Ignition Edge (you would buy the "compute" plugin). It is a standard part of the platform for all other editions and scopes.

> [@Lautaro\_Cides](#):
>
> custom libraries on the Ignition installation sit

Yes, you can create pythonish "Site Packages" under the normal hierarchy in the Ignition install folder. For these you **will** need to use `import`.

---

<div class="post-metadata">

**Author:** ![Lautaro\_Cides](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@Lautaro\_Cides](https://forum.inductiveautomation.com/u/Lautaro_Cides)\
**Post date:** [June 26, 2023, 8:45pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554/3 "2023-06-26T20:45:05Z")

</div>

Excellent! And could you give me an example of how to call a function in any component?  
I have this little test script and I would like it to return the message in the "text" property of a label.  
Or any other example of how to call this type of script in a component would be very helpful! thank you...

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e43bf750177f363165f5735ce63381e8f938894b.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 26, 2023, 8:52pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554/4 "2023-06-26T20:52:04Z")

</div>

In a component binding, use an expression binding with the [runScript()](https://docs.inductiveautomation.com/display/DOC81/runScript) expression function. Something like this:

```auto
runScript("hi.buenIntento", 0)

```

or this:

```auto
runScript("hi.hola", 0, {path.to.some.prop.for.hi})

```

From an event script, you'd just call them by their full name as normal jython functions.

That you are asking such simple questions about Ignition suggests that you haven't used IA's free online training: [Inductive University](https://www.inductiveuniversity.com/). Going through it will save you some grief, and may help you avoid reworking your designs.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 27, 2023, 7:17am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-script-project/75554/5 "2023-06-27T07:17:30Z")

</div>

You can call functions in the 2 ways described by Phil: `runscript` in expression, and regular function calls in jython.  
What he didn't say is that there are several places where you can use jython:

- script transforms in bindings
- value change scripts on properties
- components custom methods and message handlers
- components extension functions
- tag change scripts
- gateway events
- session events

As he said, go through the university, it will teach you the basics, so that you have some ground to stand on when learning all the cool parts of ignition.
