Returns an array of the system's IPv4 addresses.
Addresses := SysGetIPAddresses()
This function has no parameters.
Type: Array of Strings
This function returns an array, where each element is an IPv4 address string such as "192.168.0.1".
Currently only IPv4 is supported.
This function returns only the IP addresses of the computer's network adapters. If the computer is connected to the Internet through a router, this will not include the computer's public (Internet) IP address. To determine the computer's public IP address, use an external web API. For example:
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") whr.Open("GET", "https://api.ipify.org") whr.Send() MsgBox "Public IP address: " whr.ResponseText
addresses := SysGetIPAddresses() msg := "IP addresses:`n" for n, address in addresses msg .= address "`n" MsgBox msg