JS external script error
All  1-3  4-8

Previous
Next
 From:  danperk (SBEECH)
5871.4 
Hi Dan,

There is a very easy way to migrate your custom scripts from beta to beta.

Once you install a new beta, just uninstall the previous beta and it will remove
all files except the ones you have added. Then you just copy them into the new
beta folder. This works on PC, not sure if the Mac uninstall works the same.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dan (DANLANIGAN)
5871.5 In reply to 5871.4 
OK thanks, I will try this on the next beta - too late for the last one.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5871.6 In reply to 5871.3 
Hi Dan, no they can't go into a separate folder like that, they currently have to go into the commands folder. The way it's currently set up, they will only be processed as a "command" if they are in there. A "command" script is a little different than an "inline script", it does various setup stuff like loading the command's UI file, setting up undo records, clearing some kinds of selection states, various assorted stuff like that. Some of those things that are not happening when it's run as inline script is what's causing the particular problem.

Well I guess you could keep them in a separate folder if you want just for bookkeeping, like maintain your own folder which MoI wouldn't even know about and just copy from your own folder into the new MoI's commands folder when you upgrade.

Or it also should work fine to just copy the entire previous commands folder into a new release's one and just say No to overwriting any files too.

Eventually I want to totally revamp how custom plug-in scripts are installed, I would like to make them go into a central location under %AppData% like moi.ini so they would automatically persist between upgrades and also have some central repository of them where you could browse through some categories of them and push a button or something to install one instead of doing manual copying. There is a fair amount of work involved in setting up that whole system so I'm not exactly sure when it will happen though, right now I have put a higher priority on things like bug fixes and modeling improvements.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5871.7 In reply to 5871.3 
> I thought I had read somewhere that MOI could resolve this path.

Well it will find things in that directory but it will treat it as an "inline script" (usually meant for things that just do a kind of single action rather than having their own UI and multiple stages and such), not as a full command.

Most inline scripts just have script code pasted directly into the command field of the shortcut key, but if it's particularly large in size it is possible to put it in a separate file and that's what a scripts folder can be used for. But this is rare, as far as I can remember only one single script (FullScreen.js) has been distributed this way.

Most things should go into the commands folder instead, and the shortcut key should list just the command name, no file extension or script: prefix on it.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  dan (DANLANIGAN)
5871.8 In reply to 5871.6 
Thanks for the detailed response. Between what you and others have explained I will be able to come up with a method of maintaining custom scripts across upgrades. I think that you are right in assigning this (script install system) a low priority, there are so many more important things than this. Thanks again.

Dan
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-8