"destruk" wrote:
Eval fails too as it doesn't exist in the current firmware.
I'm trying to find a way to not have to rely on the version number reported by the device before trying to execute new code elements provided in future firmware.
The method is supposed to report the region the roku device is in, so you can contact the closest CDN to the user. - so it would return "US" or "UK" or other or something for the country code.
The following works for me...
' Initialize the country variable
country = invalid
' Create a device info object
deviceInfo = CreateObject("roDeviceInfo")
' Attempt to use GetCountryCode() to set country
' Eval returns the error code, so the print should print it to the console (252 = success)
print Eval("country = deviceInfo.GetCountryCode()")
' If the eval failed, set the country to US
If country = invalid Then
country = "US"
End If
print country
Where did you read about GetCountryCode, if I may ask? I have a need for that, but don't see it documented anywhere...
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)