MoI discussion forum
MoI discussion forum

Full Version: V5 beta startup folder

From: dune1982
17 Jul   [#1]
I did search the forum but could not find how MoI V5 looks in the startup folder. should there be a myplugin.htm file? If so will it automatically pop up in the commandbar in the bottom?
From: Michael Gibson
17 Jul   [#2] In reply to [#1]
Hi dune1982, when MOI starts up, just before it is ready to display the main window it will look in the appdata startup folder for any .js files and run each of those scripts.

It doesn't do anything for .htm files.

But it is possible for the .js script to modify the UI and insert things like buttons in the bottom command bar.

I'll make an example.

- Michael
From: Michael Gibson
17 Jul   [#3] In reply to [#1]
Hi dune1982, here is an example - put StartupExample.js and TestIcon.png both inside the appdata startup folder. The script inserts a button into the bottom command bar.

- Michael

Attachments:
StartupExample.js

Image Attachments:
TestIcon.png 


From: dune1982
22 Jul   [#4] In reply to [#3]
Thank you Michael,
that did help and made it clear.

Is there a way now to make MoI not chache the files on startup. Currently I have to restart MoI on every change in a file.
I know there was a section in the moi.ini but i was not able to find it in V5

Also I have now moved everything in to my own folder in C:\Users\<user>\AppData\Roaming\Moi\plugins\<myplugin> where should i put my EnglishStrings.txt file so MoI can find it?
From: Michael Gibson
22 Jul   [#5] In reply to [#4]
Hi dune1982,

re:
> Is there a way now to make MoI not chache the files on startup. Currently I have to restart
> MoI on every change in a file. I know there was a section in the moi.ini but i was not able
> to find it in V5

On http://moi3d.com/wiki/Scripting look for:
"See here for info on disabling file caching so commands will reload on every run"


re:
> \Users\<user>\AppData\Roaming\Moi\plugins\<myplugin> where should i put
> my EnglishStrings.txt file so MoI can find it?

Currently MoI will only load string tables from the install's UI folder so there isn't a way to deploy your own string table in a plugin.

So in your .htm files don't use <moi:Text textid=""/> which looks up text in the string table, instead just put in your text directly.

So like this:
<moi:CommandButton>Text</moi:CommandButton>

Instead of this:
<moi:CommandButton><moi:Text textid=""/></moi:CommandButton>

- Michael
From: dune1982
23 Jul   [#6] In reply to [#5]
Ok so to make it multilingual, i have to come up with my own solution or put my strings in the original txt files.

See attached the section of my moi.ini, there is no DisableFileCaching

Image Attachments:
DisableFileCaching.PNG 


From: Michael Gibson
23 Jul   [#7] In reply to [#6]
Hi dune1982,

re:
> See attached the section of my moi.ini, there is no DisableFileCaching

You need to add in that line.

- Michael