Plugin:MirLua/en: Difference between revisions
Updating to match new version of source page |
Updating to match new version of source page |
||
| (6 intermediate revisions by the same user not shown) | |||
| 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> | ||
Also it has a short version '''a'''. | Also it has a short version '''<code>a</code>'''. | ||
<code>m.CallService('DB/Ini/ImportFile', 0, a'import\\autoexec.ini')</code> | <code>m.CallService('DB/Ini/ImportFile', 0, a'import\\autoexec.ini')</code> | ||
=== toucs2 === | === toucs2 === | ||
Same as | Same as <code>toansi</code> but for utf-16. Also it has a short version '''<code>u</code>'''. | ||
=== tonumber === | === tonumber === | ||
If it receives | If it receives <code>light userdata</code> parameter then returns it address as number, otherwise uses standard lua <code>tonumber</code> behavior. | ||
=== topointer === | === topointer === | ||
Converts lua types | Converts lua types <code>bool</code>, <code>number</code>, <code>string</code> to <code>light userdata</code>. | ||
=== string.interpolate === | === string.interpolate === | ||
| Line 34: | Line 34: | ||
== Internal modules == | == Internal modules == | ||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_clist|m_clist]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_core|m_core]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_database|m_database]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_genmenu|m_genmenu]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_hotkeys|m_hotkeys]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_http|m_http]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_icolib|m_icolib]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_json|m_json]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_message|m_message]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_options|m_options]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_protocols|m_protocols]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_sounds|m_sounds]] | |||
* [[Special:MyLanguage/Plugin:MirLua/Module/m_srmm|m_srmm]] | |||
* EN | * EN | ||
| Line 54: | Line 68: | ||
== Examples == | == Examples == | ||
{{Content:MirLua/Examples}} | [[Special:PrefixIndex/Content:MirLua/Examples/|Some examples]]. | ||
<!-- Todo use this after https://github.com/ProfessionalWiki/SubPageList/issues/74 will be fixed | |||
{{Content:MirLua/Examples}} --> | |||
== External links == | == External links == | ||
Latest revision as of 17:54, 28 September 2023
| 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
- m_clist
- m_core
- m_database
- m_genmenu
- m_hotkeys
- m_http
- m_icolib
- m_json
- m_message
- m_options
- m_protocols
- m_sounds
- m_srmm
- EN
Examples
External links