V5 Wish List

 From:  Michael Gibson
10114.391 In reply to 10114.390 
Hi Burr, so the way that commands in MoI work is when you enter in a command name to run, MoI will look in the commands folders (both install and appdata and any additional ones listed in moi.ini) for a .js script file with that name.

There can optionally be an .htm file with the same name as well. If there is then it will start up loading the .htm file into the command options area and let that finish loading first before loading and executing the .js file's script code.


re:
> Not more js files just for the name match.

It won't work like that because the .js file is the main thing associated with a command, it's the .htm file that is optional. If you have a command that does something and exits without showing any UI then only the .js file is needed.


re:
> So why i ask, is "i" would make a polygon3-polygon5 and polygon8 htm file etc. As many as i like, though they all only really need polygon.js

Instead of doing that you could give a command line parameter and have the script pay attention to that to parameterize it.

There is also a mechanism where if you give a command line parameter using the id values of one of the controls in the .htm file it will set the control to that value. So for example instead of having polygon3.htm, polygon5.htm, polygon8.htm you could do:

Polygon numsidesinput=3
Polygon numsidesinput=5
Polygon numsidesinput=8

- Michael