WKen
November 23, 2022, 1:17pm
1
I tried to package script and icons to the osp, but failed. . .
+RegExpColumns
+TheMovieDB Poster&Info Downloader V2.0
<?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 (5.6 KB)
Leo
November 23, 2022, 2:13pm
2
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.
WKen
November 23, 2022, 2:27pm
3
After many tests, I still can't see the icon.
dlg.Control("static3").label = "tmdb-32.png"; // Icon
Leo
November 23, 2022, 2:30pm
4
You need to use Script.LoadImage
to load the image.
There's an example here: Help with Script Dialog icon - #6 by Jon
WKen
November 23, 2022, 2:47pm
5
I tested it, same.
dlg.Control("static3").label = Script.LoadImage("Paste.png"); // Icon
Paste (Copy) Here to New Subfolder.osp (3.4 KB)
Leo
November 23, 2022, 2:52pm
6
Jon's example script still works, so everything you need should be included there.
WKen
November 23, 2022, 3:11pm
7
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.