plugin commands (commands.txt)
Posted by: Herr Rossi
Date: August 13, 2011 02:03AM

older versions of k-meleon did come with a file called commands.txt located in the skins folder.
my question is, how can i execute one of these commands below from within a plugin?

excerpt from commands.txt:
-- COMMAND ID's, PLUGIN COMMANDS & MACROS FOR MOUSE GESTURES & TOOLBARS --

PLUGIN COMMANDS:
----------------
bookmarks(Add) = Adds the page to bookmarks.

bookmarks(AddLink) = Adds the selected link to bookmarks.

bookmarks(Edit) = Opens the 'edit bookmarks' window.

favorites(Add) = Adds the page to favorites.

favorites(AddLink) = Adds the selected link to favorites.

favorites(Edit) = Opens the favorites folder in Windows Explorer.

hotlist(Add) = Adds the page to the hotlist.

hotlist(AddLink) = Adds the selected link to the hotlist.

hotlist(Edit) = Opens the 'edit hotlist' window.

layers(Close) = Closes the current layer.

layers(CloseAll) = Closes all layers.

layers(CloseAllOther) = Closes all but the selected layer.

layers(Last) = Switches to the last selected layer.

layers(Next) = Switches to next layer.

layers(Open) = Opens a new layer.

Re: plugin commands (commands.txt)
Posted by: JamesD
Date: August 13, 2011 06:37AM

I think the current list in the wiki is complete. You can find it at:
http://kmeleon.sourceforge.net/wiki/CommandIDs

I guess you might have to find the KM source code and see how each Command ID is created in C++.

Command ID's can be called by menus or by the macro language, but I don't think that is what you need for a plugin.

I hope this helps. It is quickly getting above my pay grade.

Re: plugin commands (commands.txt)
Posted by: Herr Rossi
Date: August 13, 2011 08:34AM

Quote
JamesD
I think the current list in the wiki is complete. You can find it at:
http://kmeleon.sourceforge.net/wiki/CommandIDs

I guess you might have to find the KM source code and see how each Command ID is created in C++.

Command ID's can be called by menus or by the macro language, but I don't think that is what you need for a plugin.

I hope this helps. It is quickly getting above my pay grade.

thanks for your reply. i am aware of these command IDs tho, there is a simple GetID-function for these available to use within plugincode. unfortunately some functions dont have command IDs like the fullscreen-function. i already checked the km-sourcecode for a solution multiple times, to no avail sad smiley

Re: plugin commands (commands.txt)
Posted by: siria
Date: August 13, 2011 10:34AM

fullscreen is a plugin itself, fullscreen.dll
Is there no source code for the plugins somewhere, perhaps in another folder?? (kplugins)
BTW an updated commands list is contained in KM1.6beta. Probably the same as here:
http://two.xthost.info/kmeleon/lizard/commands.html

Re: plugin commands (commands.txt)
Posted by: guenter
Date: August 13, 2011 10:12PM

@Herr Rossi, have You checked whether the functions that don't have command IDs are from macro commands?

@ siria, the kplugins source code is part of/in subfolders of K-Meleon source.
Only spelltest and some other plugins by mark307. A special drag and drop mouse plugin and K-Meleon CCF items are not in the K-Meleon source @ SF.



Edited 1 time(s). Last edit at 08/13/2011 10:14PM by guenter.

Re: plugin commands (commands.txt)
Posted by: Herr Rossi
Date: August 13, 2011 10:18PM

Quote
guenter
@Herr Rossi, have You checked whether the functions that don't have command IDs are from macro commands?

yes i did that.
as siria pointed out already the fullscreen() e.g. is from the dll-plugin. i didnt manage to call it directly from within my plugin. any hints concerning this would be nice.
thanks for your replies.

Re: plugin commands (commands.html in KM folder)
Posted by: siria
Date: August 13, 2011 10:21PM

Perhaps the source code of macros.dll helps: It makes that macrolanguage can call the other kplugins using "plugin(pluginname)". So the key must be in macros source (although personally I don't have the slightest clue about source codes grinning smiley)

Just curious: What kind of plugin do you want to build, to add which functions??



Edited 1 time(s). Last edit at 08/13/2011 10:25PM by siria.

Re: plugin commands (commands.html in KM folder)
Posted by: Herr Rossi
Date: August 15, 2011 07:34AM

Quote
siria
Perhaps the source code of macros.dll helps: It makes that macrolanguage can call the other kplugins using "plugin(pluginname)". So the key must be in macros source (although personally I don't have the slightest clue about source codes grinning smiley)

Just curious: What kind of plugin do you want to build, to add which functions??

hm, that makes sense somehow smiling smiley gonna have a closer look at the macro plugin.
I uploaded a little demo-movie of my plugin in action, to (hopefully) help ya to get an idea about its functionality.

http://3dv.unrealmaps.net/Lizard's-Footprints.mp4

Re: plugin commands (commands.html in KM folder)
Posted by: Herr Rossi
Date: August 16, 2011 07:20AM

thx for the macro plugin suggestion siria. after some studying i finaly got an idea how to contact a plugin directly to receive its command id.
so this problem is solved \o/

K-Meleon forum is powered by Phorum.