Preferred device scripting functions