Author Topic: Assign icon to script  (Read 3907 times)

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Assign icon to script
« on: 2010 June 19 02:14:37 »
Can I assign an icon to a script?
I'm using Nikolay's animation script as my first processing port of call now, and I'd like to add an icon to those that load on PI startup.
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Assign icon to script
« Reply #1 on: 2010 June 19 02:49:27 »
You can assign an icon to a script, but the icon will be shown on the Script menu only. Any process icons of the Script class will show the standard blue/orange "S" icon on the workspace, irrespective of the script's own icon. This will change in a future version.

Anyway, to assign an icon to a script you just have to add the following lines at the script's beginning:

#feature-icon <icon-file-name>

where <icon-file-name> represents the file name of an icon image in the PNG, TIFF, JPEG, BMP, GIF or XPM formats (PNG recommended). The icon should be 24x24 pixels, and can have a transparency (alpha) channel. Normally you should place the icon file in the same directory as the script's .js file(s) —C:/PCL/src/scripts by default—, and in such case you don't have to include a full file path, just the file name.

So far the standard scripts don't have icons; this is a pending task.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Assign icon to script
« Reply #2 on: 2010 June 19 04:59:02 »
Thanks Juan

I am interested in an icon on the workspace, even if generic - I'm unlikely to leave too many icons there.
I found I can drag a generic script icon from the Process Explorer, then point it at the Animate script.  When I double click on it though it comes with a Script Parameters dialogue rather than appearing to run?   ???

Sounds like this is something future versions may do
Not a big deal of course..... :)
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics