Development
: K-Meleon Forum
K-Meleon development related discussions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] [quote=plasmapelz] and make it display an icon of the current search engine? [/quote] I have tried to get button to change but have not made it work yet. Does anyone know how to set up the arguement to the plugin? See "Toolbars" here http://kmeleon.sourceforge.net/wiki/PluginCommands This is my test code. [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- Snippet.kmm # ---------- Located in KM 1.5.0 --------------- # ---------- code testing # # Dependencies : main.kmm, Windows Scripting Host # Resources : - # Preferences : - # Version : - # -------------------------------------------------------------------------------- # _Snippet_RunCode{ $_SnippetSearchName = getpref(STRING,"kmeleon.general.searchEngineName") ; if ($_SnippetSearchName == "Yahoo! Search") $_SnippetSearchIcon = $_Snippet_Path. "\\filter_url.bmp" ; if ($_SnippetSearchName == "MSN Search") $_SnippetSearchIcon = $_Snippet_Path. "\\hourglass.bmp" ; if ($_SnippetSearchName == "Wikipedia, The Free Encyclopedia") $_SnippetSearchIcon = $_Snippet_Path. "\\red_clock.bmp.bmp" ; if ($_SnippetSearchName == "Google Images") $_SnippetSearchIcon = $_Snippet_Path. "\\yellow_clock.bmp" ; $_SnippetTag = "\"" . "&Main Bar, &Search Buttons, HOT," . $_SnippetSearchIcon . "\"" ; alert( $_SnippetTag , "String for third item of pluginmsg" ); pluginmsg(toolbars, "SetButtonImage", $_SnippetTag); } _Snippet_BuildMenu{ # add another option to Favorites menu setmenu("F&avorites",macro,"Snippet Testing",_Snippet_RunCode,3); } _Snippet_GetPath{ ### Snippet.js is supposed to be located in the same folder as Snippet.kmm (this file). ### If it isn't, Windows Script Host will notify the user. ### Double underscore makes variable local only. $__Data=readfile(getfolder(MacroFolder)."\\Snippet.kmm"); #$_Snippet_Path=getfolder($__Data==""?UserMacroFolder:MacroFolder)."\\Snippet.js"; $_Snippet_Path=getfolder($__Data==""?UserMacroFolder:MacroFolder)."\\SearchButtons"; } $OnStartup=$OnStartup."_Snippet_GetPath;"; $OnInit=$OnInit."_Snippet_BuildMenu;"; $macroModules=$macroModules."Snippet;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development