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] @ froggy The following macro will allow viewing the source in Notpad. All that is required is a picture for the button. Name the picture (filetype bmp) as "Src_v_np.bmp" and put it in your skins/default folder. I use the Klassic skin so I have the button picture as 16x16 pixels. You might have a bigger button with another skin. Change this line in the macro to the needed size. $_Vnp_BSize = "16" ; [b]Src_v_np.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # # ---------- Src_v_np.kmm # ---------- View source in Notepad via a button # # Dependencies : main.kmm # Resources : Image Src_v_np.bmp in SKINS\DEFAULT # Preferences : "kmeleon.general.sourceEnabled", "kmeleon.general.sourceCommand" # Version : 0.1 2012-03-23 # -------------------------------------------------------------------------------- _Src_v_np_RunCode { $_Vnp_ToolbarName = "Src_v_np" ; $_Vnp_BSize = "16" ; $_Vnp_LastItem = "" ; $_Vnp_AddBarTag = $_Vnp_ToolbarName .",". $_Vnp_BSize .",". $_Vnp_BSize .",". $_Vnp_LastItem ; pluginmsg(toolbars, "AddToolbar", $_Vnp_AddBarTag); $_Vnp_ButtonName = "ViewNP" ; $_Vnp_Command = "macros(Src_v_np_View)" ; $_Vnp_MenuName = "" ; $_Vnp_tipText = "View source in Notepad"; $_Vnp_ImageHot = "Src_v_np.bmp[0]" ; $_Vnp_ImageCold = "Src_v_np.bmp[0]" ; $_Vnp_ImageDead = "Src_v_np.bmp[0]" ; $_Vnp_AddButtonTag = $_Vnp_ToolbarName.",".$_Vnp_ButtonName.",".$_Vnp_Command.",".$_Vnp_MenuName.",".$_Vnp_tipText.",".$_Vnp_BSize.",".$_Vnp_BSize.",".$_Vnp_ImageHot.",".$_Vnp_ImageCold.",".$_Vnp_ImageDead.",".$_Vnp_LastItem ; pluginmsg(toolbars, "AddButton", $_Vnp_AddButtonTag); } Src_v_np_View { $_Vnp_CurUse = getpref(BOOL,"kmeleon.general.sourceEnabled"); if ($_Vnp_CurUse) { $_Vnp_CurPgm = getpref(STRING,"kmeleon.general.sourceCommand"); setpref(STRING,"kmeleon.general.sourceCommand","NOTEPAD.EXE"); id(ID_VIEW_SOURCE); setpref(STRING,"kmeleon.general.sourceCommand",$_Vnp_CurPgm); } else { setpref(BOOL,"kmeleon.general.sourceEnabled", true); $_Vnp_CurPgm = getpref(STRING,"kmeleon.general.sourceCommand"); setpref(STRING,"kmeleon.general.sourceCommand","NOTEPAD.EXE"); id(ID_VIEW_SOURCE); setpref(STRING,"kmeleon.general.sourceCommand",$_Vnp_CurPgm); setpref(BOOL,"kmeleon.general.sourceEnabled", false); } } $OnSetup=$OnSetup."_Src_v_np_RunCode;"; $macroModules=$macroModules."Src_v_np;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development