@Savo,
Sorry for occupying your post, but if I don't make luamacro works, I can't help you ...
@mark307,
I had tested luamacros.dll plugin (the old name) there is a long time and if I remember it worked with Km 0.9.
Now with 1.1, it seems it have problems with luamacro.dll plugin (v 0.4).
I have copied luamacro.dll in kplugins.
I have copied all the samples in <km rootfolder>\Luamacros.
I copied macros.lua in profile folder and modified it to refer to my folder Luamacros.
I haven't use your old method to add menus, but a kmm file
Here are the sources:
macros.lua
----------
package.path = package.path .. ";" ..
BROWSERPATH .. "\\Luamacros\\?.lua;" ..
BROWSERPATH .. "\\Luamacros\\?.lc"
package.cpath = package.cpath .. ";" ..
BROWSERPATH .. "Luamacros\\?.dll"
require "copyaslink"
require "google"
require "multiclip"
function Eval()
local a, b
a = prompt("lua", "k-meleon", "")
if a then
b = loadstring(a)
if b then
alert(b(), "lua", ICON_INFO)
end
end
end
LuaTests.kmm
------------
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- Luamacro Extension Tests -------------------
#
# Dependencies :
# Resources : -
# Preferences : -
#
# -------------------------------------------------------
CopyAsLink{
luamacro(CopyAsLink);
}
copy_to{
luamacro(copy_to(1), Copy to internal Clipboard 1);
}
paste_from{
luamacro(paste_from(1), Paste from internal Clipboard 1);
}
GoogleSearch{
luamacro(GoogleSearch);
}
# ----- PRIVATE
_LuaTests_BuildMenu{
setmenu("&Tools",inline,LuaTests,WebServices);
setmenu(LuaTests,popup,"&Luamacros");
setmenu("&Luamacros",macro,"&Copy as Link",CopyAsLink);
setmenu("&Luamacros",macro,"&Copy To",copy_to);
setmenu("&Luamacros",macro,"&Paste from",paste_from);
setmenu("&Luamacros",macro,"&Google Search",GoogleSearch);
}
$OnInit=$OnInit."_LuaTests_BuildMenu;";
# ----------------------------------------------------------
$macroModules=$macroModules."LuaTests;";
With these two files, I have no error when launching K-Meleon and loading luamacro plugin (it appears enabled in Preferences\Plugins)
But when I Try to execute a menu entry, I have the following message:
. ------------------------------
. Error
. ------------------------------
. Command not found 'luamacro'
. ------------------------------
I have tested with the default location in profile folder -> same error
I have found that perhaps, the function was perhaps capitalized, and I search in dll with an hex editor, and I found a thing which is probably an bug:
The readme.txt refers to a pref (I don't use it, thinking that the variable in macros.lua was enough).
In the readme, the pref is :
kmeleon.plugins.luamacro.path
and in luamacro.dll, the pref referenced is
kmeleon.plugins.luamacros.path
I don't think this is the reason, but I think it's a bug.
for my problem, if you have an idea ...
A+
Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0
Web:
http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr
Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc