local clist = require("m_clist")
local icolib = require("m_icolib")
m.CreateServiceFunction("Lua/Restart",
function() m.CallService("Miranda/System/Restart", 1, 0) end)
clist.AddMainMenuItem({
Name = "Restart",
Service = "Lua/Restart",
Uid = '9FC57A01-FAC6-41AC-A009-52F1C6594095',
Icon = icolib.AddIcon('restart', 'Restart')
})
local clist = require("m_clist")
local icolib = require("m_icolib")
clist.AddMainMenuItem({
Name = "LangPack Reload",
Service = "LangPack/Reload",
Uid = '7EB16447-754B-43ED-940B-96EDBD92EDAC',
Icon = icolib.AddIcon('langreload', 'LangPack Reload')
})
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local moduleName = 'watcherPackSendFile'
local BBBF_ISIMBUTTON = 32
local BBBF_ISRSIDEBUTTON = 128
local bbButton =
{
Module = moduleName,
ButtonID = 1,
Flags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON,
Tooltip = m.Translate('Send File'),
Icon = icolib.AddIcon(moduleName, 'Send File')
}
mbb.AddButton(bbButton)
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == moduleName and l.ButtonID == 1 then
m.CallService('SRFile/SendCommand', l.hContact, 0)
end
end)
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local moduleName = 'watcherPackReceivedFiles'
local BBBF_ISIMBUTTON = 32
local BBBF_ISRSIDEBUTTON = 128
local bbButton =
{
Module = moduleName,
ButtonID = 1,
Flags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON,
Tooltip = m.Translate('Received Files'),
Icon = icolib.AddIcon(moduleName, 'Received Files')
}
mbb.AddButton(bbButton)
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == moduleName and l.ButtonID == 1 then
m.CallService('SRFile/OpenContRecDir', l.hContact, 0)
end
end)
-- ==LuaScript==
-- @name SmileyPackSwitcher
-- @description Switching big-small smileypack
-- @author MikalaiR
-- @version 1.5
-- ==/LuaScript==
-- ==Settings==
local fullpack = "Emoji_full"
-- ==/Settings==
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local db = require('m_database')
local BBBF_ISLSIDEBUTTON = 64
local bbButton =
{
Module = "MirLua_SmileyPackSwitcher",
ButtonID = 1,
Flags = BBBF_ISLSIDEBUTTON,
Tooltip = "Big smiley pack",
Icon = icolib.AddIcon('SmileySwitchIconD', 'SmileyPackSwitcher icon')
}
mbb.AddButton(bbButton)
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == bbButton.Module and l.ButtonID == bbButton.ButtonID then
if db.GetContactSetting(l.hContact, "SmileyAdd", "CustomCategory") == fullpack then
db.DeleteContactSetting(l.hContact, "SmileyAdd", "CustomCategory")
else
db.WriteContactSetting(l.hContact, "SmileyAdd", "CustomCategory", fullpack)
end
end
end)
-- ==LuaScript==
-- @name LToButton
-- @description
-- @author MikalaiR
-- @version 1.1
-- ==/LuaScript==
-- ==Settings==
-- ==/Settings==
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local vars = require('m_variables')
local db = require('m_database')
local message = require('m_message')
local BBBF_ISLSIDEBUTTON = 64
function GetCurrentSong()
local result = ""
local strArtist = vars.FormatString("%listening_artist%")
local strTitle = vars.FormatString("%listening_title%")
if strArtist ~= "" and strTitle ~= "" then
result = strArtist .. " - " .. strTitle
end
return result
end
function GetOutputText(isChat)
local result = ""
local strCurrentSong = GetCurrentSong()
if strCurrentSong ~= "" then
if isChat ~= 0 then
result = "/me слушает " .. strCurrentSong
else
result = "Я слушаю " .. strCurrentSong
end
else
if isChat ~= 0 then
result = "/me ничего не слушает"
else
result = "Я ничего не слушаю"
end
end
return result
end
local bbButton =
{
Module = "MirLua",
ButtonID = 3,
Flags = BBBF_ISLSIDEBUTTON,
Tooltip = "Я слушаю...",
Icon = icolib.AddIcon('LTButtonIcon', 'ListeningTo button icon')
}
mbb.AddButton(bbButton)
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == bbButton.Module and l.ButtonID == bbButton.ButtonID then
local contactProto = db.GetContactSetting(l.hContact, "Protocol", "p")
local text = GetOutputText(db.GetContactSetting(l.hContact, contactProto, "ChatRoom", 0))
message.Paste(l.hContact, text)
end
end)
//обновлено 20.07.2015
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local variables = require('m_variables')
local message = require('m_message')
local moduleName = 'watcherPackListeningTo'
local BBBF_ISCHATBUTTON = 16
local BBBF_ISIMBUTTON = 32
local BBBF_ISLSIDEBUTTON = 64
local IDC_MESSAGE = 1002
local IDC_CHATMESSAGE = 1009
local EM_REPLACESEL = tonumber('00C2', 16)
local bbButton =
{
Module = moduleName,
ButtonID = 1,
Flags = BBBF_ISCHATBUTTON | BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON,
Tooltip = m.Translate('Listening To'),
Icon = icolib.AddIcon(moduleName, 'Listening To')
}
mbb.AddButton(bbButton)
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == moduleName and l.ButtonID == 1 then
local text = variables.FormatString('?puts(vl,`/me is listening to `%listening_artist%` - [`%listening_year%` - `%listening_album%`] - `%listening_track%`. `%listening_title%`.`)?if(?strncmp(!get(vl),`/me is listening to - [ - ] - . .`,34),`/me is listening to silence...`,!get(vl))')
message.Paste(l.hContact, text)
end
end)
m_icolib = require('m_icolib')
local icon = m_icolib.AddIcon("icon_id", "Icon Name")
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local message = require('m_message')
local script = {}
local moduleName = 'omegleNewCommand'
local description = m.Translate('Send /new')
local BBBF_ISCHATBUTTON = 16
local BBBF_ISLSIDEBUTTON = 64
function script.Load()
mbb.AddButton({
Module = moduleName,
ButtonID = 1,
Flags = BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON,
Tooltip = description,
Icon = icolib.AddIcon(moduleName, description)
})
end
mbb.OnMsgToolBarButtonPressed(function(w, l)
if l.Module == moduleName and l.ButtonID == 1 then
message.Send(l.hContact, '/new')
end
end)
function script.Unload()
mbb.RemoveButton(bbButton)
end
return script;
local db = require('m_database')
local proto = require('m_protocols')
local message = require('m_message')
local relayContact = 0
proto.OnReceiveMessage(function(w, l)
if l.hContact ~= relayContact then
local module = db.GetSetting(l.hContact, 'Protocol', 'p')
local nick = db.GetSetting(l.hContact, module, 'Nick')
local account = proto.GetAccount(module)
local text = string.format('%d:%s:%s:%s', l.hContact, nick, account.ProtoName, l.Message)
message.Send(relayContact, text)
else
local hContact, text = l.Message:match('^(%d+):(.*)$')
if hContact ~= relayContact then
message.Send(tonumber(hContact), text)
end
end
end)
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
print(ccd.Message)
end)
winapi = require('winapi')
local hHook = m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
winapi.MessageBox(_, ccd.Message, "MirLua", 0, 10000)
-- print(ccd.Message)
end)
Отправил в личку сообщение.message = require('m_message')
winapi = require('winapi')
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
if ccd.Message == 'stopword' then
winapi.ShellExecute('command', 'file', 'args', 0)
message.Send(ccd.hContact, ccd.Message)
return 1;
end
end)
Однако, прекращение дальнейшей обработки хука будет работать только в следующем ночнике.
clist = require('m_clist')
genmenu = require('m_genmenu')
message = require('m_message')
messages = {
'Привет!',
'Пока'
-- и т.п.
}
m.CreateServiceFunction('Scripts/SendQuickMessage', function(w, l)
local hContact = tonumber(w)
local text = messages[tonumber(l)]
message.Send(hContact, text)
end)
hRoot = clist.AddContactMenuItem({
Name = 'Quick messages',
Uid = 'DF2DEB8E-F33A-4C89-BB81-6638742C7B89'
})
for i,v in ipairs(messages) do
local hItem = clist.AddContactMenuItem({
Name = v,
Flags = 0x0100,
Service = 'Scripts/SendQuickMessage',
Position = i,
Parent = hRoot
})
genmenu.ConfigureMenuItem(hItem, 3, topointer(i))
end
p.s., ConfigureMenuItem будет работать только в следующем ночнике.
local db = require('m_database')
m.HookEvent("DB/Event/Added", function(w, l)
local hContact = tonumber(w)
local path = m.Parse('%miranda_userdata%\\History\\')
.. db.GetContactInfo(hContact, 'Uid')
.. '.log'
local contactName = db.GetContactInfo(hContact, 'DisplayName')
local message = GetMessage(tonumber(l), contactName)
if message then
local file = io.open(path, 'a+')
if file then
file:write(message)
io.close(file)
end
end
end)
function GetMessage(hDbEvent, contactName)
local event = DBEVENTINFO(hDbEvent)
if event.Type == 0 then
local isSent = event.Flags & 2 == 2
local nick = isSent and 'me' or contactName
local date = os.date("%d.%m.%Y %H:%M:%S", event.Timestamp)
local data = BLOB.new(event.Blob, event.Length)
return string.interpolate('{1} {2}:\t{3}\n', nick, date, toutf8(data))
end
return nil
end
function toutf8(bytes)
local bytearr = {}
for i = 1, #bytes do
local v = bytes[i]
local utf8byte = v < 0 and (0xff + v + 1) or v
table.insert(bytearr, string.char(utf8byte))
end
return table.concat(bytearr)
end
Нужно чтобы путь до папки History существовал.
local protocols = require('m_protocols')
local hContact = 1441
local account = protocols.GetAccount(hContact)
protocols.CallService(account.ModuleName, '/GetInfo')
[spoiler] [/spoiler]
.local protocols = require('m_protocols')
protocols.CallSendChain(1441, '/GetInfo')
package.cpath = package.cpath .. ';c:\\windows\\system32\\?.dll'
а потом уже дергать require.local hHook = m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
local pre = PROTORECVEVENT(ccd.lParam)
print(pre.Message)
end
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local moduleName = 'MyReceivedFiles'
local BBBF_ISIMBUTTON = 32
local BBBF_ISRSIDEBUTTON = 128
local bbButton =
{
Module = moduleName,
ButtonID = 1,
Flags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON,
Tooltip = m.Translate('My received files'),
Icon = icolib.AddIcon(moduleName, 'My received files')
}
mbb.AddButton(bbButton)
m.HookEvent("TabSRMM/ButtonsBar/ButtonPressed", function(w, l)
bcd = CustomButtonClickData(l)
if bcd.Module == moduleName and bcd.ButtonID == 1 then
m.CallService('SRFile/OpenContRecDir', bcd.hContact, 0)
end
end)
local script = {}
function script.Unload()
mbb.RemoveButton(bbButton.Module, bbButton.ButtonID)
end
return script
m.CallService("DB/Contact/Delete", hContact)
message = require('m_message')
winapi = require('winapi')
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
if ccd.Message == 'stopword' then
winapi.ShellExecute('command', 'file', 'args', 0)
message.Send(ccd.hContact, ccd.Message)
return 1;
end
end)
local winapi = require('winapi')
local hService = m.CreateServiceFunction('CreateFunctionSearch', function(w)
winapi.MessageBox(_, w, 'Lua', 0, 10000)
return
end)
result = m.CallService('CreateFunctionSearch', '[b]test[/b]')
u'[b]test[/b]'
local hService = m.CreateServiceFunction('CreateFunctionSearch', function(w)
result = m.CallService('QuickSearch_PLUGIN/Show', w)
return
end)
m.HookEvent('Miranda/System/ModulesLoaded', function()
m.CallService('CreateFunctionSearch', u'[b]test[/b]')
end)
local NORMAL_PRIORITY_CLASS = 0x20
local STARTF_USESHOWWINDOW = 0x1
local si =
{
dwFlags = STARTF_USESHOWWINDOW,
wShowWindow = 0
}
si.wShowWindow = 1
local r = winapi.CreateProcess(nil, 'cmd.exe /k', nil, nil, 0, NORMAL_PRIORITY_CLASS, si, '')
--winapi.CloseHandle (pi.hThread)
winapi.CreateProcess(nil, 'cmd.exe /k', nil, nil, 0, 0, si, nil)
Функция CreateProcess возвращает 5 параметров:local r, hProcess, hThread, dwProcessId, dwThreadId = winapi.CreateProcess(nil, 'cmd.exe /k', nil, nil, 0, 0, si, nil)
if r > 0 then
--...
winapi.CloseHandle(hProcess)
winapi.CloseHandle(hThread)
end
Насчет взаимодействия, я пока не вижу вариантов как это можно сделать.Я думаю, можно сделать небольшую обертку над Named Pipes.
local r, hProcess, hThread, dwProcessId, dwThreadId = winapi.CreateProcess(nil, 'cmd.exe /k', nil, nil, 0, 0, si, nil)Гениально :THUMBS UP:, я забыл о возможности присваивания списком в Lua, а я ему структуру совал: получил ошибку "таблице присваивается число".
local db = require('m_database')
local message = require('m_message')
m.CreateServiceFunction('Lua/OpenContactWindow', function(w, l)
for hContact in db.Contacts() do
local hDbEvent = db.GetFirstUnreadEvent(hContact)
if hDbEvent > 0 then
message.Send(hContact, m.NULL)
end
end
end)
m.CreateServiceFunction('Lua/ReadContactEvents', function(w, l)
for hContact in db.Contacts() do
for hDbEvent in db.UnreadEvents(hContact) do
db.MarkReadEvent(hDbEvent)
end
end
end)
local db = require('m_database')
local message = require('m_message')
m.CreateServiceFunction('Lua/OpenContactWindow', function(w, l)
for hContact in db.Contacts() do
local hDbEvent = db.GetFirstUnreadEvent(hContact)
if hDbEvent > 0 then
-- message.Send(hContact, m.NULL)
m.CallService('SRMsg/SendCommand', hContact)
end
end
end)
m.CreateServiceFunction('Lua/ReadContactEvents', function(w, l)
for hContact in db.Contacts() do
for hDbEvent in db.UnreadEvents(hContact) do
-- db.MarkReadEvent(hDbEvent)
db.MarkReadEvent(hContact, hDbEvent)
end
end
end)
local ttb = require('m_toptoolbar')
local icolib = require('m_icolib')
m.HookEvent('TopToolBar/ModuleLoaded', function ()
ttb.AddButton({
Name = 'Join chat',
Service = 'JABBER/*/Groupchat',
lParamDown = topointer(u'room_name@conference.jabber.ru'),
Icon = icolib.AddIcon('joinChat', 'Join chat')
})
end)
local ttb = require('m_toptoolbar')
local icolib = require('m_icolib')
m.HookEvent('TopToolBar/ModuleLoaded', function ()
ttb.AddButton({
Name = 'Join chat',
Service = 'JABBER/*/Groupchat',
lParamDown = topointer(u'room_name@conference.jabber.ru'),
Icon = icolib.AddIcon('joinChat', 'Join chat')
})
end)
local message = require("m_message")
local winapi = require("winapi")
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA(l)
if ccd.Message == 'stopword' then
winapi.ShellExecute('cmd.exe', 'file', 'args', 0)
message.Send(ccd.hContact, ccd.Message)
return 1;
end
end)
При отправке сообщений выскакивает ошибка - attempt to call a nil value (global 'CCSDATA'), больше ничего не происходит.local db = require("m_database")
local message = require("m_message")
local winapi = require("winapi")
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA.new(l)
if db.GetContactInfo(ccd.hContact, 'Uid') == '<uid_of_contact>' and ccd.Message == '<stopword>' then
winapi.ShellExecute('cmd.exe', 'file', 'args', 0)
message.Send(ccd.hContact, ccd.Message)
print(111)
return 1;
end
end)
require('m_protocols')
в начало. local ccd = CCSDATA.new(l)
print(ccd.Message)
Показывает, что внутри ccd.Message всегда "nil", независимо от того что я отправляю.
local protocols = require('m_protocols')
local db = require("m_database")
local message = require("m_message")
local winapi = require("winapi")
m.HookEvent("MirLua/RecvMessage", function(w, l)
local ccd = CCSDATA.new(l)
local pre = PROTORECVEVENT(ccd.lParam)
if pre.Message == "stopword" then
winapi.CreateProcess(nil, 'cmd.exe /k', nil, nil, 0, 0, si, nil)
message.Send(ccd.hContact, 'Принято!')
return 1;
end
end)
local ccd = CCSDATA(l)
подскажите, с помощью какой настройки, ключа, плагина можно принудительно переводить миранду по всем(выбранным) протоколам в онлайн при запуске?
local protos = require('m_protocols')
local ID_STATUS_OFFLINE = 40071
local ID_STATUS_ONLINE = 40072
m.HookEvent('Miranda/System/ModulesLoaded', function()
for acc in protos.Accounts() do
if acc.IsEnabled and not acc.IsVirtual then
local status = acc:CallService('/GetStatus')
if (status == ID_STATUS_OFFLINE) then
acc:CallService('/SetStatus', ID_STATUS_ONLINE)
end
end
end
end)
local schedule = require('m_schedule')
local wait_period_in_secons = 5
local time = os.time() + wait_period_in_secons
schedule.At(time).Do(function()
-- код здесь вызовется через 5 секунд
end)
local clock = os.clock
function sleep(n) -- seconds
local t0 = clock()
while clock() - t0 <= n do end
end
То миранда остается недоступной (не показывая ни значков, ни главного окна, ни всплывающих окон) до тех пор, пока все протоколы не загрузятся.
local protos = require('m_protocols')
local schedule = require('m_schedule')
local ID_STATUS_OFFLINE = 40071
local ID_STATUS_ONLINE = 40072
m.HookEvent('Miranda/System/ModulesLoaded', function()
local accounts = {}
for account in protos.Accounts() do
if account.IsEnabled and not account.IsVirtual then
local status = account:CallService('/GetStatus')
if (status == ID_STATUS_OFFLINE) then
accounts[#accounts + 1] = account
end
end
end
local i = 1
schedule.Every(5).Seconds().Do(function()
local account = accounts[i]
print(account.AccountName)
if account == nil then
return schedule.STOP
end
account:CallService('/SetStatus', ID_STATUS_ONLINE)
i = i + 1
end)
end)
m.ForkThread(function()
sleep(5)
-- перевести протоколы в онлайн
end)
local schedule = require('m_schedule')
schedule.Wait(5).Seconds().Do(function()
-- перевести протоколы в онлайн
end)
local proto = require('m_protocols')
local schedule = require('m_schedule')
local LIMIT = 10
local WAIT = 2
local function split(str, limit)
local pos = 1
return function()
local res = str:sub(pos, pos + limit - 1)
if #res > 0 then
pos = pos + #res
return res
end
end
end
m.HookEvent("MirLua/SendMsg", function(w, l)
local ccs = CCSDATA(l);
if #ccs.Message <= LIMIT then
return 0
end
local n = 1
local first = true
local service = ccs.Service
local hContact = ccs.hContact
local wParam = ccs.wParam
local message = ccs.Message
for msg in split(message, LIMIT) do
if first then
proto.CallSendChain(hContact, service, wParam, msg)
first = false
else
schedule.Wait(WAIT * n).Seconds().Do(function()
proto.CallSendChain(hContact, service, wParam, msg)
end)
n = n + 1
end
end
local hMessage = 100500
local account = proto.GetAccount(hContact)
local moduleName = account.ModuleName
schedule.Wait(WAIT * n + 1).Seconds().Do(function()
proto.BroadcastAck(moduleName, hContact, 0, 0, topointer(hMessage))
end)
return hMessage
end)
local schedule = require('m_schedule')
local srmm = require('m_srmm')
local msgs = require('m_message')
local icolib = require('m_icolib')
local winapi = require('winapi')
local WAIT = 2
local IDC_MESSAGE = 3012
local function split(str, limit)
local pos = 1
return function()
local res = str:sub(pos, pos + limit - 1)
if #res > 0 then
pos = pos + #res
return res
end
end
end
function get_message_area(hwnd)
local hEdit = winapi.GetDlgItem(hwnd, IDC_MESSAGE)
if (hEdit == nil) then
error("unable to find message area")
end
return hEdit
end
function get_log_message(hwnd)
local hEdit = get_message_area(hwnd)
return winapi.GetWindowText(hEdit);
end
function clear_log_message(hwnd)
local hEdit = get_message_area(hwnd)
winapi.SetWindowText(hEdit, '');
end
function send_message_by_parts(hContact, message, limit)
if #message <= limit then
msgs.Send(hContact, message)
return
end
local n = 1
local first = true
for msg in split(message, limit) do
if first then
msgs.Send(hContact, msg)
first = false
else
schedule.Wait(WAIT * n).Seconds().Do(function()
msgs.Send(hContact, msg)
end)
n = n + 1
end
end
end
local module = 'sendInParts'
local BBBF_ISCHATBUTTON = 16
local BBBF_ISIMBUTTON = 32
local BBBF_ISRSIDEBUTTON = 128
srmm.AddButton{
Module = module,
ButtonId = 1000,
Flags = BBBF_ISCHATBUTTON | BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON,
Tooltip = m.Translate('Send in parts of 1000 characters'),
Icon = icolib.AddIcon(module, 'Send in parts of 1000 characters')
}
srmm.AddButton{
Module = module,
ButtonId = 4000,
Flags = BBBF_ISCHATBUTTON | BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON,
Tooltip = m.Translate('Send in parts of 4000 characters'),
Icon = icolib.AddIcon(module, 'Send in parts of 4000 characters')
}
m.HookEvent("SRMM/ButtonsBar/ButtonPressed", function(w, l)
local bcd = CustomButtonClickData(l)
if bcd.Module ~= module then
return;
end
local message = get_log_message(bcd.hWnd)
send_message_by_parts(bcd.hContact, message, bcd.ButtonId)
clear_log_message(bcd.hWnd)
end)
local res = str:sub(pos, pos + limit - 1)Предположительно, проблема здесь. Вылетает при попытке обработать сообщение длиной более 2048 символов. В тех случаях когда надо их нарезать ломтиками - они гораздо больше. Доходит до десятков тысяч.
local res = str:sub(pos, utf8.offset(str,pos + limit))
в функции split, кириллические строки начали отправляться адекватно. winapi = require('winapi')
winapi.MessageBox(_, "Привет мир", "MirLua", 0, 10000)
работаетmessage = require('m_message')
winapi = require('winapi')
local hHook = m.HookEvent('MirLua/RecvMessage', function(w, l)
local ccd = CCSDATA(l)
local pre = PROTORECVEVENT(ccd.lParam)
print('Привет мир')
print(pre.Message)
message.Send(pre.hContact, 'Принято!')
winapi.MessageBox(_, "Привет мир", "MirLua", 0, 10000)
end)
взятый из вашей темы. И ни чего не происходит, когда я пишу самому себе или мне кто-то пишет....
local hHook = m.HookEvent('MirLua/RecvMessage', function(w, l)
local ccd = CCSDATA(l)
local pre = PROTORECVEVENT(ccd.lParam)
print(pre.Message)
...
Из старых сообщений беру код. Ругается на PROTORECVEVENT.PROTORECVEVENT выпилился, потому что он был тупой заменой DBEVENTINFO.
Как я понял, в 0.96.4.1 PROTORECVEVENT удален (removed PROTORECVEVENT with its own set of constants.).
Какую конструкцию использовать? Нужно в скрипте получить текст входящего сообщения.