# Script editor Custom Methods

**URL:** <https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [May 20, 2022, 5:52pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852 "2022-05-20T17:52:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [May 20, 2022, 5:52pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852/1 "2022-05-20T17:52:50Z")

</div>

When trying to copy code, if the selected text contains the def line, nothing is put on the clipboard. This led me to believe copy/paste was not working because I was trying to copy a script from one screen to another and was using ctrl A to select the whole script.

If this was a purposely included feature, it is a bad one in my opinion.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 20, 2022, 6:02pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852/2 "2022-05-20T18:02:36Z")

</div>

Where are you seeing this behavior? I can only replicate it on ignition defined def statements.

This is Ctrl + A on a schedule script.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bdf829e568a5d2a1bbb91ba07b55b052ed2340f9.png)

Ctrl + A on a script in my library:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/6/664e9235c1680d11f44c46288859d33e8ada186f.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 20, 2022, 6:15pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852/3 "2022-05-20T18:15:35Z")

</div>

> [@Dustin\_VanKeuren](#):
>
> When trying to copy code, if the selected text contains the def line, nothing is put on the clipboard. This led me to believe copy/paste was not working because I was trying to copy a script from one screen to another and was using ctrl A to select the whole script.

In the new editor in 8.1.18, ctrl+a once will select the "user authored" portion of code, and a second time will select all code including the definition. Both will copy to the clipboard cleanly.

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [May 20, 2022, 6:32pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852/4 "2022-05-20T18:32:46Z")

</div>

Specifically when copying custom method code from scripts attached the top level (window level, not root)  
I have reproduced this many times. Any time the def statement is in the copied text, the copy does not happen. I am going to assume this is the case no matter what the custom method is attached to.

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [May 20, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/script-editor-custom-methods/59852/5 "2022-05-20T18:34:42Z")

</div>

I figured this would be fixed in a future version. Thought I would bring it up just in case. Thanks for the response. Just trying to keep my sanity somewhat intact! 🙂
