# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- External_IP.kmm # ---------- K-Meleon Macro Language to show the current external ip number --------------- # # Dependencies : main.kmm # Resources : http://www.nirsoft.net/show_my_ip_address.php # Preferences : - # Version : 0.5.0 August 18, 2009 # Author : JamesD # -------------------------------------------------------------------------------- _External_IP_Display { macroinfo=_("Display current external IP number"); $_External_IP_Site = "www.nirsoft.net/show_my_ip_address.php"; $kTabs?opentab( $_External_IP_Site )pennew( $_External_IP_Site ); } _External_IP_BuildMenu { # add another option to Misc section of Tools menu setmenu("&Tools",macro,_("External IP"),_External_IP_Display,Misc); } $OnInit=$OnInit."_External_IP_BuildMenu;"; $macroModules=$macroModules."External_IP;";
Quote
JujuLand
@Yogi,
It's not something like IPbar,
// External IP Address (get your external IP locally) UTF8Encoding utf8 = new UTF8Encoding(); WebClient webClient = new WebClient(); String externalIp = utf8.GetString(webClient.DownloadData( "http://whatismyip.com/automation/n09230945.asp"); Response.Write("<h2>Your External IP Address is: " + externalIp + "</h2><br />");
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- ExIP.kmm # ---------- K-Meleon Macro Language to show EXTERNAL ip number in browser title --- # # Dependencies : main.kmm # Resources : "whatismyip.com/automation/n09230945.asp" # Preferences : - # Version : 0.9 August 18, 2009 # -------------------------------------------------------------------------------- _ExIP_RunLoad { # find the current display title $ExIP_OldTitle = getpref(STRING,"kmeleon.display.title"); #alert($ExIP_OldTitle, "$ExIP_OldTitle DEBUG", INFO); # obtain the URL of the current page $ExIP_OldURL = $URL ; # open the page to "http://whatismyip.com/automation/n09230945.asp" open("whatismyip.com/automation/n09230945.asp"); } _ExIP_RunRead { id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); $_ExIP_Clip = getclipboard(); $_ExIP_NewTitle = $ExIP_OldTitle . " ExIP " .$_ExIP_Clip; setpref(STRING,"kmeleon.display.title",$_ExIP_NewTitle); open($ExIP_OldURL) ; } _ExIP_Revert_Title { #alert($ExIP_OldTitle, "$ExIP_OldTitle DEBUG", INFO); setpref(STRING,"kmeleon.display.title",$ExIP_OldTitle); } _ExIP_BuildMenu { $_ExIP_Popm =_("ExIP") ; setmenu("&Tools",popup,$_ExIP_Popm,Misc); setmenu($_ExIP_Popm,macro,_("Load IP Host"),_ExIP_RunLoad,0); setmenu($_ExIP_Popm,macro,_("Read IP to Title"),_ExIP_RunRead,1); } $OnQuit=$OnQuit."_ExIP_Revert_Title;"; $OnInit=$OnInit."_ExIP_BuildMenu;"; $macroModules=$macroModules."ExIP;";
Quote
JamesD
Perhaps I do not understand the requirements.
Quote
JamesD
I don't run FF so I cannot see what happens with LiveIP in that browser. Also I have a static external IP over a DSL line so my address never changes. I assume a person on dial-up would get a new dynamic IP address each time they connected. Would that address not remain the same the entire session?
Quote
JamesD
As for a refresh in 5 minutes, I think there is not a clock or timer function in KM.
Quote
JamesD
I think I am right in saying that a macro will only execute in the window/tab in which it was started.
Quote
JamesD
That is why ExIP was a two menu item system.
Quote
JujuLand
-utils handles a timer, but to use carefully.
_Snippet_AutoTime { $_format = "%H%M"; $_result = pluginmsgex(utils, "strftime", $_format ,STRING); statusbar("Time at load is ".$_result. " hours"); }
Quote
Babai
P.S
Has tested ExIP.kmm has noticed that at repeated inclusion
ExIP - or allocates all page (Ctrl+A), or Cleans all from page heading. Not stably works.
And at transition to other page IP the address vanishes from heading.
And it would be desirable that it was updated approximately in 5 minutes.
user_pref("kmeleon.display.title", "");and change it to include the title you wish. The default is
user_pref("kmeleon.display.title", "K-Meleon");Since I run several versions of KM, my title includes the version.
user_pref("kmeleon.display.title", "K-Meleon 1.5.3"); ExIP.kmm# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- ExIP.kmm # ---------- K-Meleon Macro Language to show EXTERNAL ip number in browser title --- # # Dependencies : main.kmm # Resources : "whatismyip.com/automation/n09230945.asp" # Preferences : - # Version : 1.0 August 19, 2009 # -------------------------------------------------------------------------------- _ExIP_RunLoad { # find the current display title $ExIP_OldTitle = getpref(STRING,"kmeleon.display.title"); #alert($ExIP_OldTitle, "$ExIP_OldTitle DEBUG", INFO); # obtain the URL of the current page $ExIP_OldURL = $URL ; # open the page to "http://whatismyip.com/automation/n09230945.asp" open("whatismyip.com/automation/n09230945.asp"); } _ExIP_RunRead { id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); $_ExIP_Clip = getclipboard(); $_ExIP_NewTitle = $ExIP_OldTitle . " ExIP " .$_ExIP_Clip; setpref(STRING,"kmeleon.display.title",$_ExIP_NewTitle); open($ExIP_OldURL) ; } _ExIP_Revert_Title { #alert($ExIP_OldTitle, "$ExIP_OldTitle DEBUG", INFO); if (length($ExIP_OldTitle) != 0 ){ setpref(STRING,"kmeleon.display.title",$ExIP_OldTitle); } } _ExIP_BuildMenu { $_ExIP_Popm =_("ExIP") ; setmenu("&Tools",popup,$_ExIP_Popm,Misc); setmenu($_ExIP_Popm,macro,_("Load IP Host"),_ExIP_RunLoad,0); setmenu($_ExIP_Popm,macro,_("Read IP to Title"),_ExIP_RunRead,1); } $OnQuit=$OnQuit."_ExIP_Revert_Title;"; $OnInit=$OnInit."_ExIP_BuildMenu;"; $macroModules=$macroModules."ExIP;";
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- ExIP2.kmm # ---------- K-Meleon Macro Language to show EXTERNAL ip number in statusbar --- # # Dependencies : main.kmm # Resources : "whatismyip.com/automation/n09230945.asp" # Preferences : "k-meleon.ExIP2.use" # Version : 0.2 August 19, 2009 # -------------------------------------------------------------------------------- _ExIP2_RunLoad { # obtain the URL of the current page $ExIP2_OldURL = $URL ; # set a flag for ExIP2 in use setpref(BOOL,"k-meleon.ExIP2.use", true); # open the page to "http://whatismyip.com/automation/n09230945.asp" open("whatismyip.com/automation/n09230945.asp"); } _ExIP2_RunRead { id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); $ExIP2_Clip = getclipboard(); statusbar("External IP ".$ExIP2_Clip); open($ExIP2_OldURL) ; } _ExIP2_StatusBarSet { if (length($ExIP2_Clip) != 0) { statusbar("External IP ".$ExIP2_Clip); } } _ExIP2_Auto_stage { if (getpref(BOOL,"k-meleon.ExIP2.use") == true ) { macros(_ExIP2_RunRead); delpref("k-meleon.ExIP2.use"); } _ExIP2_BuildMenu { setmenu("&Tools",macro,_("ExIP2"),_ExIP2_RunLoad,Misc); } $OnLoad=$OnLoad."_ExIP2_StatusBarSet;"; $OnLoad=$OnLoad."_ExIP2_Auto_stage;"; $OnInit=$OnInit."_ExIP2_BuildMenu;"; $macroModules=$macroModules."ExIP2;";
Quote
Babai
Did not think that it will substitute StatusBar and will register IP address in string StatusBar near to a tag the Information on protection or the pagein indicator.
Quote
JamesD
Quote
Babai
Did not think that it will substitute StatusBar and will register IP address in string StatusBar near to a tag the Information on protection or the pagein indicator.
We might indeed have a language problem. Can you explain more which other "statusbar" you mean.
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- ActiveIP.kmm # ---------- K-Meleon Macro Language to show EXTERNAL ip number under MAIN menu --- # ---------- Clicking on "Refresh" or the IP Number will refresh the IP number # # Dependencies : main.kmm # Resources : "whatismyip.com/automation/n09230945.asp" # Preferences : "k-meleon.ActiveIP.use" # Version : 0.3 August 21, 2009 # -------------------------------------------------------------------------------- _ActiveIP_RunLoad { macroinfo = "Refresh External IP address"; $ActiveIP_OldURL = $URL ; setpref(BOOL,"k-meleon.ActiveIP.use", true); open("whatismyip.com/automation/n09230945.asp"); } _ActiveIP_RunRead { id(ID_EDIT_SELECT_ALL); id(ID_EDIT_COPY); $ActiveIP_Clip = getclipboard(); macros(_ActiveIP_BuildMenu); $_ActiveIP_Milliseconds = 5 * ( 60 * 1000 ) ; exec("wscript.exe \"".$_ActiveIP_Path."\" \"".$ActiveIP_Clip."\" \"".$_ActiveIP_Milliseconds."\"") ; open($ActiveIP_OldURL) ; } _ActiveIP_Auto_stage { if (getpref(BOOL,"k-meleon.ActiveIP.use") == true ) { #alert("ActiveIP_Auto_stage", "Running this DEBUG", INFO); macros(_ActiveIP_RunRead); delpref("k-meleon.ActiveIP.use"); } } _ActiveIP_StatusBarSet { if (length($ActiveIP_Clip) != 0) { statusbar("External IP ".$ActiveIP_Clip); } } _ActiveIP_BuildMenu { #alert("ActiveIP_BuildMenu","Running this DEBUG", INFO); $_g="Active IP"; setmenu(Main,popup,$_g,-1); $__m="TheIP"; setmenu($_g,inline,$__m); setmenu($__m,macro,$ActiveIP_Clip,_ActiveIP_RunLoad,-1); rebuildmenu($__m); } _ActiveIP_Initial { $ActiveIP_Clip = "Refresh" ; } _ActiveIP_GetPath { $__Data=readfile(getfolder(MacroFolder)."\\ActiveIP.kmm"); $_ActiveIP_Path=getfolder($__Data==""?UserMacroFolder:MacroFolder)."\\ActiveIP.js"; } ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $OnStartup=$OnStartup."_ActiveIP_GetPath;"; $OnLoad=$OnLoad."_ActiveIP_StatusBarSet;"; $OnLoad=$OnLoad."_ActiveIP_Auto_stage;"; $OnInit=$OnInit."_ActiveIP_Initial;"; $OnInit=$OnInit."_ActiveIP_BuildMenu;"; $macroModules=$macroModules."ActiveIP;"; ## *** END OF ActiveIP.kmm ***
/* ActiveIP.js by JamesD, version 1.0 2009-08-20 This script is a helper application for the K-Meleon Macro Module ActiveIP.kmm that enables you to set a timer . Windows Script Host 1.0 (or better) required! WSH is part of Microsoft Internet Explorer 5.0 and newer. Latest version of WSH is available at http://msdn.microsoft.com/scripting/ */ if (WScript.Arguments.count()==2) { var ActiveIP_CurrentIP = WScript.Arguments(0); var ActiveIP_Milliseconds = WScript.Arguments(1); WScript.Sleep( ActiveIP_Milliseconds) ; var d = new Date(); WScript.Echo("Timer expired on IP address \n\n " + ActiveIP_CurrentIP + "\n\n " + d) ; } else { objArgs = WScript.Arguments ; WScript.Echo(WScript.Arguments.Count()); for (i=0; i<objArgs.length; i++) { WScript.Echo(objArgs(i)) } } // *** END OF ActiveIP.js ***