Sign in to follow this  
Followers 0
rawrr

Get IP?

11 posts in this topic

Im making a tray icon that gives you your IP when you hover over it. Can anyone help me with the command to give your ip?

This is very useful to me because I need my IP a lot. So, please, help me. =] Thanks!

P.S. Im new. =] Well ive been registered, but I didn't do anything basically yet.

Share this post


Link to post
Share on other sites



@IPAddress1.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hehe. Thanks I just figured that out when I typed IP in the script. =] Thanks.

EDIT: How about the hover part? I have to right click to get it. =[ lol

Edited by rawrr

Share this post


Link to post
Share on other sites

Theres 2 Different IP Functions :)

#Include <INet.au3> ; Include For Function _GetIP 
$IP_Address_1 = _GetIp ()
MsgBox (0, "Notice", "Your IP Address Is : " & $IP_Address_1,0) 
; Or 
$IP_Address_2 = @IPAddress1
MsgBox (0, "Notice", "Your IP Address Is : " & $IP_Address_2,0) ; This One Is Different From The Other One...

P.S. For Any Other Help You Can Add Me On MSN... :) -- 'maxell225@hotmail.com'


Latest Projects :- New & Improved TCP Chat

Share this post


Link to post
Share on other sites

Hehe. Thanks I just figured that out when I typed IP in the script. =] Thanks.

EDIT: How about the hover part? I have to right click to get it. =[ lol

look at the TraySetOnEvent() function

specialID= $TRAY_EVENT_MOUSEOVER = -11

Then use ToolTip() or TrayTip() to display the IP, or clipput() to put it in the clipboard, or whatever.

Share this post


Link to post
Share on other sites

I kind of get what you guys mean. Can you make a script so I can compare?

Share this post


Link to post
Share on other sites

Compare what?

Share this post


Link to post
Share on other sites

Scripts.. To see if I did it right.

Share this post


Link to post
Share on other sites

While 1
Sleep (250)
HotKeySet ("{Esc}", "_Exit") 
Sleep (250)
WEnd

Is there a reason the Hotkeyset is in the while loop? Escape is often not a good hotkey to use becasue its default function is to exit the gui.

Share this post


Link to post
Share on other sites

#include <INet.au3>
#NoTrayIcon

Opt("OnExitFunc", "_Exit")
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)

Global $IP_Address

_Get_IP()

$Tray_GetIP = TrayCreateItem("Get IP")
TrayItemSetOnEvent(-1, "_Get_IP")
TrayCreateItem("")
$Tray_Exit = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1, "_Exit")

TraySetState()

While 1
    TraySetToolTip("IP Address : " & $IP_Address)
    Sleep(50)
WEnd

Func _Get_IP()
    $IP_Address = _GetIP()
EndFunc   ;==>_Get_IP

Func _Exit()
    Exit
EndFunc   ;==>_Exit


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0