Jump to content
Sign in to follow this  
mclynes

Getting Local machine IP address

Recommended Posts

Manjish

@IPAddress1

IP address of first network adapter. Tends to return 127.0.0.1 on some computers.

@IPAddress2

IP address of second network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress3 IP address of third network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress4 IP address of fourth network adapter. Returns 0.0.0.0 if not applicable.

  • Like 1

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites
ReaImDown

@IPAddress1

IP address of first network adapter. Tends to return 127.0.0.1 on some computers.

@IPAddress2

IP address of second network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress3 IP address of third network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress4 IP address of fourth network adapter. Returns 0.0.0.0 if not applicable.

_getip()

example

msgbox(0,"My Ip Address", "Your ip address is... " & _GetIp())

Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
exodius

_getip()

example

msgbox(0,"My Ip Address", "Your ip address is... " & _GetIp())

But if you use _GetIP, don't forget to #include <INet.au3>

Share this post


Link to post
Share on other sites
ReaImDown

But if you use _GetIP, don't forget to #include <INet.au3>

my bad lol, again...at work... :) or (to make your script smaller)

just copy the function and paste it in your script...

Func _GetIp() :)


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
ZebulonSmith

my bad lol, again...at work... :) or (to make your script smaller)

just copy the function and paste it in your script...

Func _GetIp() :)

 

This is an old thread, but it's also one of the first Google results when searching for "autoit get IP," so I thought I'd chime in.

_GetIP() will return the external WAN IP address of a device. For the local IP, follow Manish's advice.

Edited by ZebulonSmith
  • Like 2

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.