AMS Plugin Maker With Easy lesson

Puedes encontrar todo tipo de tutoriales y manuales referentes a AMS
Imagen
AMS Plugin Maker With Easy lesson
Ams Plugin Maker is an application to create plugins for AMS-8.
It allows to create Action,Object,Transition plugins with Lua.
The following explanation is only the first part and we will then follow the rest of the parts sequentially maybe two days later for those who want to continue
You Can Create New Object Plugin by this Way :
Imagen

We will click on the Create Project button and after pressing the following dialog will appear :
Imagen

We will choose the type of plugin we want to create as follows :
Imagen

Then write the name of the plugin and the name of the plugin project as shown in the following image :
Imagen

This Dialog also enables us to set the initial properties of the plugin to be created by pressing the Properties button as shown in the following image :
Imagen

another Dialog will show us the properties shown by the following image :
Imagen

1- The default display that shows the object element when it is added in the project .
2- The default height of the object when it is added in the project .
3 - If you want to create a plugin object of the type of windows such as Input, CompuBox, Listbox, Label, Groupbox and the like these elements if you choose the value True . If you want to create an element is used in graphics such as graphics, in this case we choose the value false .
4 - This option is enabled in the case of the creation of a object plugin of the type of windows and in the case of the selection of the value True enables the user to later focus the mouse as input elements.
5- This choice can be used later to change or enter a sound when you mouse over the top of the plugin or leave if you choose the value True is activated a user's ability to sound or add a sound change.
6. This option enables the user to later change or enter the mouse cursor when it over the top and leaves the object in the case of the selection True value .
7. This option enables the user to later change or write a comment when the mouse over the top the object.
The following is a statement of the above points :
Imagen

In general, don't worry, we will explain in detail how to invest these properties and how to use them in the Object Plugin that we want to create by continuing to read the explanation.
We will start adjusting the settings as the following image :
Imagen

Of course to save the previous settings we press the button OK for each Dialog has already appeared to us is automatically open a project to build a new plugin that we want to put the develop codes
The program will appear like this :
Imagen

To preview the result of the default settings and start building the object plugin , we click on the Project button above the image as follows:
Imagen

The project will show us this picture :
Imagen

We will click on the Build button at the top of the following image to build the plugin :
Imagen

You will see the result of the completion of the extension as follows :
Imagen

So the plugin was built successfully and so we open a new project in the AutoPlay Media Studio program to follow what was built in the plugin that we are working to create as the following video shows:



Imagen

See the following video To understand what was explained :



Imagen

Part 2

Now we will use the graphics library, we must activate its use in the AMS Plugin Maker program, so we go to the way to activate it, as shown in the following image :
Imagen

Now we will learn about the list of functions available to use and that the role of an important key when you loading and run the plugin in AutoPlay Media Studio will begin to recognize the importance of each function separately in order to coordinate and correct understanding, and gradually in the lesson with the following functionality We start :
function OnCreateObject(ObjectPtr,InstanceHandle)
Description
Called when a new instance is being created.
Parameters
ObjectPtr
(number) Memory address (pointer) of the object.
InstanceHandle
(number) Instance handle of the module , expressed as HINSTANCE.
Usually needed when you need to do a resource task or similar stuff.
Returns
There is no return value expected for this function.

--------------------------
So as we got to know the job description that this job is doing, which is that it will implement all the codes in it or that will be placed inside it as soon as the plugin starts building inside the Autoplay Media Studio program
graphics module must be initialized before calling any __Graphics.*() actions inside this function , We use the following code :
m_GraphicsToken = __Graphics.Initialize();
We can write this code directly via the keyboard or we can insert it by right-clicking and choosing Insert Action Or we can do this by using the shortcut Control + w
This dialog will appear :

Imagen

The selection is as shown in the following image :

Imagen

If you read Ams Plugin Maker Help File for  Graphics.Initialize Code you will see :
Description
Initializes graphics (gdiplus.dll) library for the plugin.
Note
This action should be called only once.
Returns
(number) Returns handle of initialization data.
If an error occurs then 0 is returned.
---------------------------------------------
So the final output of the code in the function would look like this :
function OnCreateObject(ObjectPtr,InstanceHandle)
        -- graphics module must be initialized before calling any __Graphics.*() actions
        m_GraphicsToken = __Graphics.Initialize();
end
So the variable named m_GraphicsToken is the handle number for gdiplus.dll library and we will need it later so that we can close this handle in the function that we will explain later .
Well to show what happened as follows :

Imagen

We come to the next function which is OnDeleteObject :
function OnDeleteObject(ObjectPtr)
Description
Called when this objest is about to be removed destroyed.
Note
You must release/remove all resources and object data at this time
because this function will be called at the end of this object's life.

Any unreleased data will cause memory leaks.
Parameters
ObjectPtr
(number) Memory address (pointer) of the object.
Returns
There is no return value expected for this function.
-----------------------------------
So we have to close the gdiplus.dll library that we opened earlier We can close it by knowing its handle number, which was saved inside the m_GraphicsToken variable Where we can the following code to close the handel required This code within the list of dealing with graphics We have said that we can access them directly by pressing the shortcut Control + w
again This dialog will appear :

Imagen

The selection is as shown in the following image :

Imagen

If you read Ams Plugin Maker Help File for  Graphics.Uninitialize Code you will see :
Description
Uninitializes (releases) graphics (gdiplus.dll) library for the plugin.
Note
Calling any action of Graphics module will fail after this action has been called.
__Graphics.Initialize() action should be called again in order to continue using Graphics module actions.
Parameters
Handle
(number) The handle of initilization data.
This handle should be obtained with __Graphics.Initialize() action.
Returns
This action does not return any value.
---------------------------------------------
So the final output of the code in the function would look like this :
function OnDeleteObject(ObjectPtr)
       __Graphics.Uninitialize(m_GraphicsToken);
end
Well to show what happened as follows :

Imagen


Imagen




 
tnks dude :yes: :yes:
gracias por el aporte muy bueno y útil.
Are the lessons in this way clear or useful ? Does anyone care about completing the lessons ?

:gangnamstyle-1417752182: :gangnamstyle-1417752182: :gangnamstyle-1417752182:
abood1987 escribió:
30 Nov 2019 19:39
Are the lessons in this way clear or useful ? Does anyone care about completing the lessons ?

:gangnamstyle-1417752182: :gangnamstyle-1417752182: :gangnamstyle-1417752182:
One word mate: Yes! Thanks for the tut!
carsonzillo escribió:
30 Nov 2019 21:12

One word mate: Yes! Thanks for the tut!
daviz84 escribió:
03 Dic 2019 22:20

Plase continue with the tutorials!

Ok We will continue to provide lessons for you :friends:
I will continue to put the second part maybe today . :awesome-1417754492:
Now some thing has been added in the beginning of the topic, please read again
We will continue later :friends: :dancing: :friends:
thanks