Plugin:MirLua: Difference between revisions

From Miranda NG
Plugin:MirLua
Jump to navigation Jump to search
(add links to rest of translatable modules)
No edit summary
Line 94: Line 94:
<translate>
<translate>
== Examples == <!--T:3-->
== Examples == <!--T:3-->
[[Special:PrefixIndex/Content:MirLua/Examples/|Some examples]].
</translate>
</translate>


{{Content:MirLua/Examples}}
<!-- Todo use this after https://github.com/ProfessionalWiki/SubPageList/issues/74 will be fixed
{{Content:MirLua/Examples}} -->


<translate>
<translate>
== External links == <!--T:4-->
== External links == <!--T:4-->
</translate>
</translate>

Revision as of 17:53, 28 September 2023

MirLua
MirLua
Filename MirLua.dll
Author Miranda NG team
Download links
Stable version: 32-bit, 64-bit
Development version: 32-bit, 64-bit

Extends Miranda NG functionality with Lua scripts.

Lua

The plugin uses Lua 5.3.4 which is shipped as a shared library lua53.dll.

Additional functions

toansi

Encodes lua utf-8 string to ansi. It can be useful for passing string as parameter to ansi function.

m.CallService('mRadio/Import', 0, toansi(m.Parse('%miranda_path%\\Plugins\\mradio.ini')))

Also it has a short version a.

m.CallService('DB/Ini/ImportFile', 0, a'import\\autoexec.ini')

toucs2

Same as toansi but for utf-16. Also it has a short version u.

tonumber

If it receives light userdata parameter then returns it address as number, otherwise uses standard lua tonumber behavior.

topointer

Converts lua types bool, number, string to light userdata.

string.interpolate

Provides a more readable and convenient syntax to format string output.

local h = 'Hello' print('{h}, {w}!' % {w = 'World'})

Internal modules


Examples

Some examples.


External links