add UIContext support for script