Plugin:MirLua/be: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 8: | Line 8: | ||
=== toansi === | === toansi === | ||
Encodes lua utf-8 string to ansi. It can be | Encodes lua utf-8 string to ansi. It can be useful for passing string as parameter to ansi function. | ||
<code>m.CallService('mRadio/Import', 0, toansi(m.Parse('%miranda_path%\\Plugins\\mradio.ini')))</code> | <code>m.CallService('mRadio/Import', 0, toansi(m.Parse('%miranda_path%\\Plugins\\mradio.ini')))</code> | ||
Line 20: | Line 20: | ||
=== tonumber === | === tonumber === | ||
If it receives '''light userdata''' parameter then returns it address as number, otherwise uses standard lua '''tonumber''' | If it receives '''light userdata''' parameter then returns it address as number, otherwise uses standard lua '''tonumber''' behavior. | ||
=== topointer === | === topointer === |
Revision as of 03:59, 7 April 2018
MirLua | |
---|---|
Імя файла | MirLua.dll |
Аўтар | Miranda NG team |
Спампаваць | |
Стабільная версія: | 32-bit, 64-bit |
Апошняя версія: | 32-bit, 64-bit |
Пашырае функцыянал Miranda NG з дапамогай Lua скрыптоў.
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
- EN
Прыклады
{{#subpages:Content:MirLua/Examples}}
Спасылкі
- Forum topic dedicated to script examples<span class="ref-info" title="Unknown string" style="font-size:85%; cursor:help; color:#888;"> (you shouldn't be here)
- Lua website
- Lua in Wikipedia