# Package script and icons to the osp file

**URL:** <https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888>\
**Category:** Help & Support\
**Created:** [November 23, 2022, 1:17pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888 "2022-11-23T13:17:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [November 23, 2022, 1:17pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/1 "2022-11-23T13:17:44Z")

</div>

I tried to package script and icons to the osp, but failed. . .  
+RegExpColumns  
+TheMovieDB Poster&Info Downloader V2.0

```auto
<?xml version="1.0"encoding="utf-8"?>
<iconset name="COPYMOVE">
     <display_name>COPY MOVE Icons</display_name>
     <copyright>(c)2022 Ken</copyright>
     <artist>Ken</artist>
     <set size="small" width="20" height="20" filename="COPY MOVE.png">
           <icon name="CPMV" row="1" col="1" />
     </set>
     <set size="large" width="32" height="32" filename="COPY MOVE.png">
           <icon name="CPMV" row="1" col="1" />
     </set>
</iconset>

```

[Paste (Copy) Here to New Subfolder.osp](https://resource.dopus.com/uploads/short-url/4EphCYjrXOFgKFU9UT5dGujpSSo.osp) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [November 23, 2022, 2:13pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/2 "2022-11-23T14:13:35Z")

</div>

If it's for an icon you want to use in a script dialog, it doesn't need to be in an icon set, and the XML isn't needed. (You'd only need it for toolbar buttons.) Just put the PNG inside the .osp and refer to it by filename in the script and it should work.

---

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [November 23, 2022, 2:27pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/3 "2022-11-23T14:27:51Z")

</div>

After many tests, I still can't see the icon.  
 ![image](https://resource.dopus.com/uploads/default/original/3X/2/d/2df7b154ddce06b010836e8bf492e1809ec591ca.png)  
 ![image](https://resource.dopus.com/uploads/default/original/3X/e/6/e67ddde1824e3f213478dbbeaad572d6b2a2737d.png)

```auto
dlg.Control("static3").label = "tmdb-32.png"; // Icon

```

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [November 23, 2022, 2:30pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/4 "2022-11-23T14:30:05Z")

</div>

You need to use `Script.LoadImage` to load the image.

There's an example here: [Help with Script Dialog icon - #6 by Jon](https://resource.dopus.com/t/help-with-script-dialog-icon/30656/6)

---

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [November 23, 2022, 2:47pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/5 "2022-11-23T14:47:33Z")

</div>

I tested it, same. 😥  
`dlg.Control("static3").label = Script.LoadImage("Paste.png"); // Icon`  
[Paste (Copy) Here to New Subfolder.osp](https://resource.dopus.com/uploads/short-url/7sU47J0bHxVGdcjwXYr6zLyRA5v.osp) (3.4 KB)

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [November 23, 2022, 2:52pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/6 "2022-11-23T14:52:43Z")

</div>

Jon's example script still works, so everything you need should be included there.

![image](https://resource.dopus.com/uploads/default/original/3X/4/5/453f6261468d7a6abcc2e6c1441cf3c60986f5b1.png)

---

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [November 23, 2022, 3:11pm UTC](https://resource.dopus.com/t/package-script-and-icons-to-the-osp-file/42888/7 "2022-11-23T15:11:34Z")

</div>

I checked and modified many times, still. 🙃  
Maybe something went wrong in the script?

EDIT: I downloaded Jon's osp file, the folder of images needs to be named images. 😅
