Plugin:MirLua: Difference between revisions
add translatable m_sounds |
add tvar's in 'Additional functions' |
||
| Line 23: | Line 23: | ||
<translate> | <translate> | ||
<!--T:11--> | <!--T:11--> | ||
Also it has a short version <tvar|a_syntax_symbol>'''a'''</>. | Also it has a short version <tvar|a_syntax_symbol>'''<code>a</code>'''</>. | ||
</translate> | </translate> | ||
| Line 31: | Line 31: | ||
<translate> | <translate> | ||
<!--T:12--> | <!--T:12--> | ||
Same as | Same as <tvar|toansi><code>toansi</code></> but for utf-16. Also it has a short version <tvar|u_syntax_symbol>'''<code>u</code>'''</>. | ||
</translate> | </translate> | ||
| Line 37: | Line 37: | ||
<translate> | <translate> | ||
<!--T:13--> | <!--T:13--> | ||
If it receives | If it receives <tvar|light_userdata><code>light userdata</code></> parameter then returns it address as number, otherwise uses standard lua <tvar|tonumber><code>tonumber</code></> behavior. | ||
</translate> | </translate> | ||
| Line 43: | Line 43: | ||
<translate> | <translate> | ||
<!--T:14--> | <!--T:14--> | ||
Converts lua types | Converts lua types <tvar|bool><code>bool</code></>, <tvar|number><code>number</code></>, <tvar|string><code>string</code></> to <tvar|light_userdata><code>light userdata</code></>. | ||
</translate> | </translate> | ||
Revision as of 22:07, 1 June 2018
| 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
- EN
Examples
{{#subpages:Content:MirLua/Examples}}
External links