"getIPAddrs()" wrote:
[...] Provides a way for your application to get the local IP address of the Roku box. This can be used in conjunction with the ECP (see the External Control Protocol Guide) command "launch" to start a different channel from the current channel.
IP = createObject("roDeviceInfo").getIpAddrs()[0] 'neat: sets IP to invalid if returned array is empty
"EnTerr" wrote:
Oh shucks. It was too good to be true, localhost fails on fw3 indeed. Instead this should do it, i hope?IP = createObject("roDeviceInfo").getIpAddrs()[0] 'neat: sets IP to invalid if returned array is empty
"TheEndless" wrote:
I don't think that will work. GetIPAddrs returns an associative array, not an array, so there is no index "0".
ipAA = createObject("roDeviceInfo").getIpAddrs()but on back of my mind was bothering me ip may remain un-initialized and i also like shorter and self-maintaining code, as possible. This morning for some reason i thought i can go shorter. Could it be true that night owls are wiser?
for each eth in ipAA:
ip = ipAA[eth]
end for
IPs = createObject("roDeviceInfo").getIpAddrs()
IPs.reset()
ip = IPs[IPs.next()]
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!