Actr_GetIPAddress (function reference)

Activator Plug-in > Functions reference > Actr_GetIPAddress
Activator Plug-in for FileMaker Pro

Actr_GetIPAddress

Gets the IP address(ses) of this computer.

SyntaxFunction badge

Actr_GetIPAddress ( switches )

Parameters

switchesYou can leave this blank or put one of these:

Switches

-InterfaceIndex = xget the IP address of interface x, the first interface starts at 1
-Defaultinterfaceget the default IP address of this computer
-GetIPv6(Mac OS only) return the IPv6 address

Returned Result

Data type returned

Text

Result

the IP address of this computer.

Originated in

Activator Plug-in 1.2

Compatibility

FileMaker Pro 12 to 16

Considerations

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.

Example

Set Field [ result ; Actr_GetIPAddress ( "" ) ]

This command will return the IP address for this computer, for example “192.168.1.24”.

Example 2

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 “198.123.32.1”.

Related functionFunction badge

Actr_StartListener

Related topics

Activator Plug-in online help (overview)


Online Help Page for Activator Plug-in for 12 to 16 –> Actr_GetIPAddress (actrp4613) 2017-0822 17:14:00