Plugin:MirLua/pl: Difference between revisions

From Miranda NG
Plugin:MirLua/pl
Jump to navigation Jump to search
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 12: Line 12:
<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 '''toansi''' but for utf-16. Also it has a short version '''u'''.
Same as <code>toansi</code> but for utf-16. Also it has a short version '''<code>u</code>'''.


=== tonumber ===
=== tonumber ===
If it receives '''light userdata''' parameter then returns it address as number, otherwise uses standard lua '''tonumber''' behavior.  
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 '''bool''', '''number''', '''string''' to  '''light userdata'''.
Converts lua types <code>bool</code>, <code>number</code>, <code>string</code> to  <code>light userdata</code>.


=== string.interpolate ===
=== string.interpolate ===

Revision as of 22:08, 1 June 2018

MirLua
MirLua
Nazwa pliku MirLua.dll
Autor Miranda NG team
Pobierz
Wersja stabilna: 32-bit, 64-bit
Wersja rozwojowa: 32-bit, 64-bit

Poszerza funkcjonalność Mirandy NG dzięki skryptom Lua.

Lua

Wtyczka używa Lua 5.3.4, która jest dołączana jako biblioteka dynamiczna lua53.dll.

Dodatkowe funkcje

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'})

Moduły wewnętrzne


Przykłady

{{#subpages:Content:MirLua/Examples}}

Zewnętrzne linki