Improvement requests
: K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ Yogi Several false starts later, I have a macro which works for custom proxies. It does not yet handle auto detect or changes from the tools menu. Try this and see if it works for you. [b]ProxTog.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- ProxTog.kmm # ---------- Proxy bar with icon for proxy on and proxy off # ---------- Does not yet handle auto detect or pick up on change from tools menu # # Dependencies : main.kmm # Resources : # Preferences : "network.proxy.type" # Version : 0.3 3/18/09 # -------------------------------------------------------------------------------- _ProxTog_RunBar{ $_ProxTog_ToolbarName = "Proxy" ; $_ProxTog_BWidth = "52" ; $_ProxTog_BHeight = "14" ; $_ProxTog_LastItem = "" ; $_ProxTog_AddBarTag = $_ProxTog_ToolbarName .",".$_ProxTog_BWidth.",".$_ProxTog_BHeight.",". $_ProxTog_LastItem ; #alert($_ProxTog_AddBarTag, "bar tag DEBUG", INFO); pluginmsg(toolbars, "AddToolbar", $_ProxTog_AddBarTag); $_ProxTog_ButtonName = "PT" ; $_ProxTog_Command = "macros(_ProxTog_Button)" ; $_ProxTog_MenuName = "" ; $_ProxTog_tipText = "Toggle proxy"; $_ProxTog_ImageHot = "ProxyTog.bmp[1]" ; $_ProxTog_ImageCold = "ProxyTog.bmp[0]" ; $_ProxTog_ImageDead = "ProxyTog.bmp[2]" ; $_ProxTog_AddButtonTag = $_ProxTog_ToolbarName.",".$_ProxTog_ButtonName.",".$_ProxTog_Command.",".$_ProxTog_MenuName.",".$_ProxTog_tipText.",".$_ProxTog_BWidth.",".$_ProxTog_BHeight.",".$_ProxTog_ImageHot.",".$_ProxTog_ImageCold.",".$_ProxTog_ImageDead.",".$_ProxTog_LastItem ; #alert($_ProxTog_AddButtonTag, "button tag DEBUG", INFO); pluginmsg(toolbars, "AddButton", $_ProxTog_AddButtonTag); macros(_ProxTog_Status); } _ProxTog_Status{ # Button setup indicated proxy as "on" # If actual proxy status is "off" the proxy.type will zero if (getpref(INT,"network.proxy.type") == 0) { $_ProxTog_IconTag = $_ProxTog_ToolbarName.",".$_ProxTog_Command.", COLD, ProxyTog.bmp[2]" ; pluginmsg(toolbars, "SetButtonImage", $_ProxTog_IconTag); } } _ProxTog_Button{ # If a defined proxy is in use the status will be in getpref(INT,"network.proxy.type") $_ProxTog_Status = getpref(INT,"network.proxy.type"); if ($_ProxTog_Status != 0) { # A proxy was in use CHANGE TO NOT IN USE setpref(INT,"network.proxy.type",0); $_ProxTog_IconTag = $_ProxTog_ToolbarName.",".$_ProxTog_Command.", COLD, ProxyTog.bmp[2]" ; pluginmsg(toolbars, "SetButtonImage", $_ProxTog_IconTag); } else { # A proxy was not in use CHANGE TO IN USE setpref(INT,"network.proxy.type",1); $_ProxTog_IconTag = $_ProxTog_ToolbarName.",".$_ProxTog_Command.", COLD, ProxyTog.bmp[0]" ; pluginmsg(toolbars, "SetButtonImage", $_ProxTog_IconTag); } } $OnSetup=$OnSetup."_ProxTog_RunBar;"; $macroModules=$macroModules."ProxTog;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development