Sorry Juan, but I must react to your post. PCL documentation (still incomplete) is not helpful for JavaScript. Here is simple example:
This is part of your code (AutoSTF.js)
function main()
{
var images = ImageWindow.windows;
.
.
.
}
main();
From where can I know, that
ImageWindow has property
windows?
https://pixinsight.com/developer/pcl/doc/html/classpcl_1_1ImageWindow.htmlWhy can I write ImageWindow without defining main UIObject? (from PCL Doc... "...UIObject is the root base class of all PCL classes...").
Another example - I try to create simple script to write image properties (width, height) into console.
var window = ImageWindow.activeWindow; // in PCL documentation defined as ActiveWindow() - method and UpperCase first letter
var view = window.currentView; // CurrentView() - same as above
var h = view.height; // Height() - same as above
I got undefined property view.height as result of this simple script.
Of course it's possible to read scripts from other authors, but it's not easy to understand it using PCL doc help.
It will be very useful to write simple PixInsight reference about javascript objects, their methods and properties. It will help us to start programming (and understanding) PixInsight utilities in this language.