Sign in to follow this  
Followers 0
mclynes

Getting Local machine IP address

7 posts in this topic

How do i get my local machine IP Address with autoit?

Share this post


Link to post
Share on other sites



@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.

1 person likes this

[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

#3 ·  Posted (edited)

@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

_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

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

#6 ·  Posted (edited)

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
2 people like this

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