Author Topic: How to open the help panel from an script?  (Read 4955 times)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
How to open the help panel from an script?
« on: 2013 March 22 03:14:33 »
Hi,

I am writing with PIDoc the documentation for an script. I would like to put a button on the script that opens the help panel of PixInsight. However I don't  how to do that using PJSR.

Any ideas?

Andrés.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: How to open the help panel from an script?
« Reply #1 on: 2013 March 25 02:27:28 »
Hi Andrés,

In version 1.8.0 RC5, I have added two new static methods to the Dialog core JavaScript object, namely:

void Dialog.openBrowser( String uri[, String title[, int width, int height]] )

Opens a modal dialog box with a PixInsight browser control (the same used in the Process Explorer and Object Explorer windows) and loads the specified URI. The function allows specifying an optional window title and window dimensions in pixels. If no dimensions are specified, width=1024 and height=768 are used by default.

Boolean Dialog.browseScriptDocumentation( String scriptName[, String title[, int width, int height]] )

This function is similar to the above one, but loads the installed documentation for a featured script. scriptName is the name of a featured script as it appears on the Script main menu item (or equivalently under the Scripts item in the categorized Process Explorer tree). The function returns true if a script with the given name exists and is currently featured; false otherwise.

I think these methods fill the existing gap regarding integrated script documentation. Let me know if they are what you were thinking about.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: How to open the help panel from an script?
« Reply #2 on: 2013 March 25 02:39:48 »
Thanks Juan.
I think these methods will be very useful.