Gets the IP address(es) of this computer.
Actr_GetIPAddress ( switches )
|switches||You can leave this blank or put one of these:|
|-InterfaceIndex = x||get the IP address of interface x, the first interface starts at 1|
|-Defaultinterface||get the default IP address of this computer|
|-GetIPv6||(macOS only) return the IPv6 address|
Data type returned
the IP address of this computer.
Activator Plug-in 1.2
FileMaker Pro 15 to 19
To publish your address you can put the returned IP address in a shared database, together with other clarifying data, like your name. This makes it easy to send a remote event to a particular person: look up the IP address that is in the same record as the name. See the Remote.fmp12 example file, where this is shown.
NOTE: On computers with multiple IP addresses GetIPaddress returns the first IP address if you leave the switch empty. On Mac OS you can (starting with version 1.3.2) also ask for an other than the first IP address.
Set Field [ result ; Actr_GetIPAddress ( "" ) ]
This command will return the IP address for this computer, for example “192.168.1.24”.
Set Field [ result ; Actr_GetIPAddress ( "-InterfaceIndex = 1" ) ] Set Field [ result ; Actr_GetIPAddress ( "-InterfaceIndex = 2" ) ]
This command will return the first and the second IP address for this computer, for example “192.168.1.24” and “188.8.131.52”.