Development :  K-Meleon Forum
K-Meleon development related discussions. 
lua macro plugin v0.3-
Posted by: mark307
Date: June 04, 2006 08:27PM

I follow the custom to create new thread for each (major) release. Thanks for the suggestion, rmn.

http://rapidshare.de/files/22181323/luamacro-0.3.zip.html

* 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.

http://rapidshare.de/files/22181435/kmplus-0.0.1.zip.html

regards.

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: June 05, 2006 11:35AM

Great to see a new version out. Great work! mark307. I'm making a new pref panel using lua plugin which is very convenient. Thanks for your work.

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: June 05, 2006 12:11PM

@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?

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: mark307
Date: June 05, 2006 08:52PM

Sorry, I forgot to pack it into the package. However the source package contains it, please check.
regards.

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: June 05, 2006 11:06PM

OK. I see. I'll check it. thanks.

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: mark307
Date: July 22, 2006 08:20PM

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

rapidshare.de/files/26620304/luamacro-0.3.1-0.9.zip.html

Belows are for 1.0.

* Add: Functions ToggleSideBar, InjectJS, InjectCSS, GetInfoAtClick, GetKmeleonVersion, SetGlobalVar
* Add: Constants TYPE_UNISTRING, TYPE_TSTRING, OPEN_NEWTAB, OPEN_BACKGROUNDTAB, OPEN_CLONE
* Add: Callback OnActivateWindow
* Fix: Checks buffer size when uses GetPreference.
* Add: example search1.lua

rapidshare.de/files/26620363/luamacro-0.3.1-1.0.zip.html

kmplus:

* Change: lua-5.1.1 final
* (dialog) Add: font.
* (dialog) Add: example dt_conv.lua dt_conv_cmd.lua dt_conv_dlg.lua

rapidshare.de/files/26620430/kmplus-0.0.2.zip.html

Thanks.

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Fred
Date: July 23, 2006 12:33AM

Thank you.
Fred

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: July 23, 2006 11:16PM

Thanks.

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.

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: July 26, 2006 01:55AM

@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?

Regards,

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: mark307
Date: July 26, 2006 09:25PM

Thanks for encouraging. That is admiration of great macro works, with joke. Macro's menu variable hack is very nice, it is impossible with luamacros.

BTW: I will stop to release for 0.9 series. Are there anyone using lua with 0.9 series?

@Hao
You can put the code anywhere between after loading setmenu.lua before running SetupHook (OnSetup). macros.lua is also OK.

Thanks.

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: simpleinventor
Date: July 27, 2006 01:01AM

Still no graphics manipulation?

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: mark307
Date: July 27, 2006 09:13PM

@simpleinventor

I don't have any idea yet how to support graphics.

Regards,

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: July 27, 2006 09:46PM

@mark307,
Thanks. I 've already got it.

Regards,

Hao

Options: ReplyQuote
Re: lua macro plugin v0.3-
Posted by: Hao Jiang
Date: July 28, 2006 01:35AM

@mark307,

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.



Hao

Options: ReplyQuote


K-Meleon forum is powered by Phorum.