* Change: Lua 5.1.1
* Fix: GetGlobalVar returns corrupted data when variable is empty string.
* Remove: common dialog functions
* Add: OnInit, OnDestroy, OnFindNick, OnSetup.
* Add: example autoload.lua, nick.lua
Kmplus is lua addon library consists of common dialog, dialog template (showing user defined dialog) and menu (appending menu item from lua). These feature are experimental and sometimes troublesome, but brings new functions to K-Meleon.
@mark307,
The dialog_demo.lua is not included in the package. And I think I need a demo file to see how this kmplus work. Could you please update the package and include this file?
New macros.dll and macro are superb. luamacros isn't necessary than before ('e`)
luamacros:
* Change: lua-5.1.1 final
* Change: popupmenu returns nil when menu is canceled.
* Change: os.exit() is ignored.
* Change: print function is replaced by using OutputDebugString.
* Fix: incompatible manner of togglepref
* Add: Asks you at every 65535 instructions whether continue or not.
* Add: Constant KMEL_PLUGIN_VER
* Add: example useragent.lua search_add_jp.lua
Although we got a better macros.dll, the lua macros is really needed since it still can do much more things. The string manipulation and advanced dialog functions are still very necessary for K-Meleon. Thank you for update.
@Mark307,
Regarding the kmplus plugin, I have some questions on setmenu method, in your example, you have:
do
local options = {
{},
{"Set Default Engine", "luamacros(search.SetSearch)"},
{},
{"Open results in current page", "luamacros(search.SetOpen(0))"},
{"Open results in new page", "luamacros(search.SetOpen(1))"},
{"Open results in background", "luamacros(search.SetOpen(2))"},
}
-- scan registred search engines and append menu
local k, v
for k, v in pairs(search.engines) do
table.insert(options, 1, {
v.name or k, "luamacros(search.Search(" .. k .. "))",
})
end
-- add menu
setmenu.define("Main", -3, "&Lua", {
{"Copy As Link", "luamacros(CopyAsLink)"},
{"Search", "luamacros(search.Search)"},
{"Search Option", options},
{"Proxy", {
{"No Proxy", "luamacros(proxy.change(no))"},
{"Default Proxy", "luamacros(proxy.change(gateway))"},
{"Local Proxy", "luamacros(proxy.change(local))"},
}},
{"Page Links", "luamacros(ViewLinks)"},
{"List Links", "luamacros(ListLinks)"},
})
end
My question is where to put this "do end" block? In macros.lua?
Just some suggestions for further development of lua macro plugins: ( I know these should not be easy, but hope some of them could be done in the future)
1. Using sidebar API. Now the sidebar API need to use the editor like the one in bookmark plugin. If the lua macro plugin can handle the sidebar API, we can write lua macros to have function like the scrapebook extension in Firefox.
2. lua macro plugin can handle saving the webpages. Like we can save a web page without prompint the save dialog and use the page title as the save filename.