General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Pages: Previous12
Current Page: 2 of 2
Re: K-Meleon And IP the address
Posted by: Babai
Date: August 27, 2009 08:41AM

Quote
Alex.Tarantul
Friends, whether probably to take for a basis IP Bar IP Bar.dll and change that dll so that it was displayed not IP of an opened site, but my own IP? Babai means it smiling smiley

Alex.Tarantul I do not know, but for some reason shows one and that IP 90.156.153.26

Загляните на совдеповский форум!!!!!

Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: JamesD
Date: August 27, 2009 01:32PM

@ Alex.Tarantul

I work only in the KM macro language. I have no skill at creating or editing a DLL file.

ActiveIP is the best that I can to to meet the requirement of showing the external IP and allowing for a refresh after 5 minutes.

A menu item "Active IP" shows on the main menu line and if you click on it , you will see "Refresh" ( first time in session only ) or your external IP address. If you click on the "Refresh" or the IP address, the macro will run again to obtain your external IP address. At the same time a reminder for 5 minutes will be started.

Please note that a refresh will cause your system to load a new page in the current window/tab, read that page, and then re-load the page which you were viewing. DON'T DO A REFRESH IN THE MIDDLE OF A TRANSACTION!

At each OnLoad event the external IP address will be displayed in the statusbar.

Version 0.5 is the most complete and stable version of ActiveIP.kmm. I will re-post the code again for those who are interested.

ActiveIP.kmm

#  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.5  August 27, 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_BuildMenuLine);
$_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 ) {
	macros(_ActiveIP_RunRead);
	delpref("k-meleon.ActiveIP.use"); }
}

_ActiveIP_StatusBarSet {
if ($ActiveIP_Clip != "Refresh") {
	if (length($ActiveIP_Clip) != 0) {
		statusbar("External IP  ".$ActiveIP_Clip); }
	}
}

_ActiveIP_BuildMenu {
$_g="Active IP";
setmenu(Main,popup,$_g,-1);
$__m="TheIP";
macros(_ActiveIP_BuildMenuLine); 
}

_ActiveIP_BuildMenuLine {
$_g="Active IP";
$__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

/* 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 ***


Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: Alex.Tarantul
Date: August 27, 2009 03:48PM

Thanks, JamesD! Great! smiling smiley

Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: Alex.Tarantul
Date: September 02, 2009 07:34AM

@JamesD
Now I think Activeip.js is not necessary. Could You change a macro code? It is necessary to remove the menu and the timer. We wish to make simply the button of manual updating on the toolbar. We thank for that waste time on it grinning smiley

Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: JamesD
Date: September 02, 2009 09:09PM

@ Alex

I hope I have what you want. Just a button to click to put external IP into the statusbar is here. http://dl.getdropbox.com/u/1522294/ActiveIPB.7z The bmp image goes into k-meleon/skins/default. I made two versions. One is 16x16 and the other is 24x24. If your skin needs 24x24, you will need to change four lines in the macro. Make the 16 to a 24 in each line.
line 41  $_AIPB_BSize = "16" ;

line 50  $_AIPB_ImageHot = "EIPB_16.bmp" ;
line 51  $_AIPB_ImageCold = "EIPB_16.bmp" ;
line 52  $_AIPB_ImageDead = "EIPB_16.bmp" ;


Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: Alex.Tarantul
Date: September 03, 2009 06:01AM

@JamesD
Thanks, I will test it today smiling smiley

Options: ReplyQuote
Re: K-Meleon And IP the address
Posted by: Alex.Tarantul
Date: September 07, 2009 12:16PM

@JamesD
Thank you! Great! smiling smiley

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


K-Meleon forum is powered by Phorum.