# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # # ---------- ActiveIPB.kmm # ---------- K-Meleon Macro Language to show EXTERNAL ip number on statusbar --- # ---------- Button to load/Refresh the IP Number # # Dependencies : main.kmm # Resources : "automation.whatismyip.com/n09230945.asp" # Preferences : "k-meleon.ActiveIPB.use" # Version : 0.3 6/23/11 # -------------------------------------------------------------------------------- ActiveIPB_RunLoad { $ActiveIPB_OldURL = $URL ; setpref(BOOL,"k-meleon.ActiveIPB.use", true); open("automation.whatismyip.com/n09230945.asp"); } _ActiveIPB_RunRead { id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); $ActiveIPB_Clip = getclipboard(); open($ActiveIPB_OldURL) ; } _ActiveIPB_Auto_stage { if (getpref(BOOL,"k-meleon.ActiveIPB.use") == true ) { macros(_ActiveIPB_RunRead); delpref("k-meleon.ActiveIPB.use"); } } _ActiveIPB_StatusBarSet { if ($ActiveIPB_Clip != "Refresh") { if (length($ActiveIPB_Clip) != 0) { statusbar("External IP ".$ActiveIPB_Clip); $TITLE = $ActiveIPB_Clip . " " . $TITLE ; } } } _ActiveIPB_RunCode{ $_AIPB_ToolbarName = "ActiveIPB" ; $_AIPB_BSize = "16" ; $_AIPB_LastItem = "" ; $_AIPB_AddBarTag = $_AIPB_ToolbarName .",". $_AIPB_BSize .",". $_AIPB_BSize .",". $_AIPB_LastItem ; pluginmsg(toolbars, "AddToolbar", $_AIPB_AddBarTag); $_AIPB_ButtonName = "LoadEIP" ; $_AIPB_Command = "macros(ActiveIPB_RunLoad)" ; $_AIPB_MenuName = "" ; $_AIPB_tipText = "Refresh External IP address"; $_AIPB_ImageHot = "EIPB_16.bmp" ; $_AIPB_ImageCold = "EIPB_16.bmp" ; $_AIPB_ImageDead = "EIPB_16.bmp" ; $_AIPB_AddButtonTag = $_AIPB_ToolbarName.",".$_AIPB_ButtonName.",".$_AIPB_Command.",".$_AIPB_MenuName.",".$_AIPB_tipText.",".$_AIPB_BSize.",".$_AIPB_BSize.",".$_AIPB_ImageHot.",".$_AIPB_ImageCold.",".$_AIPB_ImageDead.",".$_AIPB_LastItem ; pluginmsg(toolbars, "AddButton", $_AIPB_AddButtonTag); } ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $OnSetup=$OnSetup."_ActiveIPB_RunCode;"; $OnLoad=$OnLoad."_ActiveIPB_StatusBarSet;"; $OnLoad=$OnLoad."_ActiveIPB_Auto_stage;"; $macroModules=$macroModules."ActiveIPB;"; ## *** END OF ActiveIPB.kmm ***