General :  K-Meleon Forum
General discussion about K-Meleon. 
display IP+ whois
Posted by: disrupted
Date: February 26, 2009 05:43PM

displays page/link ip in a msgbox+button queries whois.org


macro
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- displays IPee in msgbox, buton queries whois.org-----------------------------------------
#
# Dependencies : - main.kmm
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------

$_tool_path=getfolder(RootFolder)."\\Tools";
$_km_path=getfolder(RootFolder)."\\k-meleon.exe";


dispIP{
macroinfo="Display IP for currently viewed domain"
menugrayed=(hostname($URL)=="");
$HOST = hostname( $URL );
exec($_tool_path."\\dispip.exe \"".$_km_path."\" " . $HOST);
}

dispIP_link{
macroinfo="Display IP for selected link"
menugrayed=(hostname($URL)=="");
$HOST = hostname( $LinkURL );
exec($_tool_path."\\dispip.exe \"".$_km_path."\" " . $HOST);
}

_dispIP_BuildMenu{
setmenu(PrivacySecurity,macro,"Display IP..",dispIP);
setmenu(LinkSave,macro,"Display Link IP..",dispIP_link);
setmenu("Page &Properties",macro,"Domain IP",dispIP,0);
}

$OnInit=$OnInit."_dispIP_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."displayIP;";



source
; AutoIt Version: 3.0
; Language: Gibberish
; Platform: Win9x/NT
; Author: yannis kargas

#NoTrayIcon
#include <inet.au3>
#include <GUIConstants[]Ex.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#Include <String.au3>

$who = ("http://whois.domaintools.com/ ")
$ExPar=_StringInsert($who, $CmdLine[2], -1)

TCPStartup()
$sIP = TCPNameToIP($CmdLine[2])
sleep(2200)


Opt("GUIOnEventMode", 1)
$main = GUICreate("displayIP", 190, 34, 828, 708, BitOR($WS_DLGFRAME, $WS_POPUP, $WS_EX_TOPMOST))
$Label1 = GUICtrlCreateLabel($CmdLine[2], 8, 3, 140, 15)
$Label2 = GUICtrlCreateLabel($sIP, 8, 17, 140, 15)
$Query = GUICtrlCreateButton(">", 160, 6, 20, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
GUICtrlSetOnEvent($Query, "WHOIS")
GUISetState(@SW_SHOW)

While 1
Sleep(12400)
exit
WEnd

Func WHOIS()
ShellExecute($CmdLine[1], $ExPar)
sleep(4220)
Exit
EndFunc



snaps


Options: ReplyQuote
Re: display IP+ whois
Date: February 26, 2009 06:28PM

Quote
disrupted
displays page/link ip in a msgbox+button queries whois.org


macro
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- displays IPee in msgbox, buton queries



L.O.L


That was a good one... I pee...grinning smiley in msgbox...grinning smiley


Having said all that i am old fashionated who like to pop up the command line and type a whois or a whoiscl and read it all in the window,,,

Assuming that i feel like doing a tracert as well....there is no replacement for command line...
But nevertheles is a nice piece of work...

I like it,,


Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted(unlogged)
Date: February 26, 2009 09:07PM

i didn't think anyone will notice tongue sticking out smiley
tend to swear when frustrated..the autoit script was very obscene till i cleaned it up grinning smiley

Options: ReplyQuote
Re: display IP+ whois
Date: February 27, 2009 01:52AM

Quote
grinning smileydisrupted(unlogged)
i didn't think anyone will notice tongue sticking out smiley
tend to swear when frustrated..the autoit script was very obscene till i cleaned it up grinning smiley


Lolsurprised smileygrinning smiley

Options: ReplyQuote
Re: display IP+ whois
Posted by: soccerfan
Date: February 27, 2009 04:41AM

Thanks disrupted smiling smiley

When clicking on Tools|Display IP or right click|page properties|Domain IP,
I get the error message: "Left hand of assignment must be a variable".
Clicking OK does then display the IP in a bar (as expected).

Edit: Trying this on Kmeleon 1.1.x.
Edit 2: No errors on Kmeleon 1.5.2

So, a macro problem? Any way of getting it to work on 1.1.3? Thanks.

soccerfan



Edited 2 time(s). Last edit at 02/27/2009 07:34AM by soccerfan.

Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted
Date: February 27, 2009 08:59AM

oh yeah.. macro language is not compatible with 1.1.x, i'll test on 1.1. and see what i can do to make a second macro for older versions.. i know some commands might not work with 1.1. and they are crucial to pass certain parameters to the autoit binary. if i can't fix it, i'm positive jamesD and desga can make a better macro for that version.

thanks for using it smiling smiley

Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted
Date: February 27, 2009 09:17AM

this macro will remove the error in 1.1.x
http://necb.bizhat.com/kmeleon/dispIP-km11x.kmm

edit: before saving it in km116 macros folder, make sure to delete the other macro dispIP.kmm or it will conflict



Edited 1 time(s). Last edit at 02/27/2009 09:20AM by disrupted.

Options: ReplyQuote
Re: display IP+ whois
Posted by: soccerfan
Date: February 27, 2009 09:18AM

Quote
disrupted
thanks for using it smiling smiley

Look forward to your next venture!

soccerfan

Options: ReplyQuote
Re: display IP+ whois
Posted by: soccerfan
Date: February 27, 2009 09:22AM

Quote
disrupted
...this macro will remove the error in 1.1.x...

Yep! It works. Thanks again!

soccerfan

Options: ReplyQuote
Re: display IP+ whois
Posted by: desga2
Date: February 27, 2009 07:11PM

@ disrupted:

Your problem in macro are in this lines that need be ended with semicolon ";" :
(...)
macroinfo="Display IP for currently viewed domain";
(...)
macroinfo="Display IP for selected link";
(...)

You must note that macroinfo statement is available since 1.5 but menu statement isn't his replacement for before 1.5 version, are statement differents.
menu define item name in menu not macro description in status bar.

Greetings.

P.S.; Also in your 1.1.x version:
Quote
disrupted
this macro will remove the error in 1.1.x
http://necb.bizhat.com/kmeleon/dispIP-km11x.kmm
Need ended menu lines, that you replaced from original code, with a semicolon ";".

K-Meleon in Spanish



Edited 2 time(s). Last edit at 02/27/2009 07:19PM by desga2.

Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted(unlogged)
Date: February 27, 2009 08:16PM

oops thanks.. i have a serious problem with semicolons, i always forget them
i fixed it in both macros. thanks desga

so there's no macroinfo replacement in 1.1.x? i never cared about the statusbar tip anyways but thought i might add it this time to make a complete macro.. but still forgot couple of semicolons. seems i can never make a perfect macro.. not at the first attempt anyways sad smiley

Options: ReplyQuote
Re: display IP+ whois
Posted by: JamesD
Date: February 27, 2009 09:22PM

First attempt? You mean things can be right on a first attempt? I just hope the attempt count does not reach three digits before everyting works.

Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted(unlogged)
Date: February 27, 2009 09:52PM

really..so that's normal? i thought you guys wrote them blindfolded smiling smiley

Options: ReplyQuote
Re: display IP+ whois
Posted by: disrupted
Date: May 21, 2009 12:02AM

update: fix for small monitors or widescreen displays, display ip may pop in quirky places(thanks to barzel for tip) also now will stay on top till it auto-exits
http://kmeleon.swiftfree.net/files/displayIP.7z

Options: ReplyQuote


K-Meleon forum is powered by Phorum.