recreate A_IPAddressXXX variables as a function

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
roysubs
Posts: 426
Joined: 29 Sep 2018, 16:37

Re: recreate A_IPAddressXXX variables as a function

02 Nov 2018, 10:53

This is amazing, I was just needing something like this as well, thanks jeeswg! :)

I am also in the position of having about 5-8 IP's on my system depending upon what I'm running (virtual routers for VMware etc).

And, like Drugwash, I am also interested in resolving the external IP address as can be found on sites like http://www.whatsmyip.org/ (does someone have a surefire way to get the external IP in other ways?).
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: recreate A_IPAddressXXX variables as a function

02 Nov 2018, 14:59

CyL0N wrote:
02 Nov 2018, 08:49
Drugwash wrote:
02 Nov 2018, 05:08
How about IPv6 addresses…? If I do ipconfig /all I get a few IPv6 tunneling pseudo-interfaces. Does SysGetIPAddresses() do that in AHKv2?

Also, CyL0N, you appear to only have internal IPs - all the 192.168.x.x are internal LAN IPs not external (web). But ipconfig doesn't show the real external IP(s) though, at least not for me on a 3G modem; I need to use third-party tools or web sites to find the real external IP.
For example, ipconfig shows me 10.112.x.x for the PPP adapter (USB 3G modem) but rejetto's HFS shows the real external IP as 82.137.x.x. This may be a corner case though.
Actually they're all online,only 192.168.2.1 is my WLAN hotspot, the rest: Tunngle Virtual Adapter(online LAN gaming), WiFi router connection,Ethernet connection to ADSL modem & another is a USB tether to my 3G hotspot on my phone which I use when I need fastest browsing speed... And yea non have a public IP as I'm also behind my ISP's NAT where I kid you not my IP on the NAT right now is 192.168.134.232.

192.168.*.* is no longer exclusive LAN territory it seems...NAT's also give that out in addition to routers.

https://lexikos.github.io/v2/docs/comma ... resses.htm
SysGetIPAddresses() does not support IPV6, at least according to docs on latest ahkv2.

Cheers.
Yeah, I guess the LAN IP range got pretty narrow. I've seen a few "strange" IPs recently that looked like LAN but were actually WAN so… anything goes.
Personally I'm not at all into AHK v2, was just curious as to whether it can keep up with current trend. If it can't do IPv6 then it's not yet in the trend, I guess.
roysubs wrote:
02 Nov 2018, 10:53
does someone have a surefire way to get the external IP in other ways?
I may be wrong but my belief is that one has to connect to another machine on the web and that machine would then tell them what IP they connected to. That's what sites like the one you mentioned do.
As I said before, I can fire up HFS and it tells me the external IP but one could build an AHK script that queries a loop of similar sites until they get a valid response.
Part of my AHK work can be found here.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, mikeyww, sanmaodo and 267 guests