CustomUI

 From:  Michael Gibson
6507.247 In reply to 6507.246 
Hi Marco, thanks for your feedback!

> I would call it "autostart"

I was thinking "startup" might have some chance at being more familiar since that's what Windows uses for a similar mechanism.


> I would make another API called "moi.filesystem.getAlternativeCommandsDir()"

Hmmm, maybe. But if it's always in the same place in appdata it should be possible to get it by moi.filesystem.getAppDataDir() + 'commands\\' already.

I'm just not entirely sure what side effects having commands being a combination of 2 folders will have - stuff in CustomUI that builds the scripts menu by enumerating the files in the commands directory would need some adjustment. I'm trying to think of anything else that might be sensitive to it.


> If there is a command with the same name in both places I think that the priority should go to the "standard" command folder,

The good part about doing this is that when a standard command gets updated with something new, it will run that new one. So someone won't wonder why they aren't seeing the new feature that was just released. The bad part is that it won't be quite as easy to override built in commands but maybe that's for the best anyway. Having a special syntax to choose one over the other doesn't really help because it would only apply to a shortcut key and not buttons in the side pane for example.


> Hmm....I think that startup scripts should run just immediately after that all the UI objects are accessible, just
> like the "document ready" of standard JavaScript or jQuery.

Yeah when the UI is finished loading that's when the main window is shown so just before that would probably be good.

Thanks, - Michael