Application.LoadObjectPlugin

Aquí puedes preguntar o compartir tus dudas y conocimientos acerca del programa
Hello to every,

How can load an object plugin in my project like this ? :

Application.LoadActionPlugin("AutoPlay\\Plugins \\MyModule.lmd");

For example load ScrollBar.APO in page 1 from coding

thanks...
from what i know it does not work for obiects plugin (load ACTION plugin - ScrollBar is an OBJECT plugin)

to use this resource must be imported and then exported from the plugin with PSDK
example: pExported = PSDK.ExportArchive (3000, _SourceFolder .. "\\ Docs \\ CDAudio.lmd")
also the action will fail if you don't use Base64 encoding and decoded (The plugin platform must match)


then there are tricks how to edit the XML file
now we wait for pablo for details :lol:
Short no. This only applies to action plugins. By design, objects need a set of parameters for initialization that are crudely consumed from a single string object, and theres no api exposed on lua to send such data.

You can check this on any .autiplay project file that uses a object
<OBJECT>
...
<PLUGIN>
<DLLFile>ListBoxEx\ListBoxEx.apo</DLLFile>
<CustomData>14713646,8355711,8355711,0,0,0,1,0,5000268,16777215,16512754,15719114,1,200,1,0,0,0,0,0,1,15511159,-11,400,0,0,0,0,! PEPSI !</CustomData>
</PLUGIN>
...
Ive reversed the pe looking for the possibility of use Page.CreateObject with type 40 (object plugin) without success. seems initialization of objects can be only done by loading it from _proj.dat serialized blob. By reversing i only see this relevant code use just before call to on_globals, on_startup... etc events.

It seems theres no way to create any object plugins at runtime. Only can think about an action plugin that loads the object, but it should handle everithing separately from ams api (size, position, custom data, base events...) and most importantly hook on Page.GetObjectPluginPtr to return its pointer, this is mandatory for anithing lua related to work. So it would be tricky but possible. Many other approaches could be made by hooking but that would be a mess to make it work agains any ams pe version on the wild.