侧边栏小工具未运行 ActiveX 控件
我构建了一个小工具,可以显示团队的待命轮换情况,并且我正在尝试将他们的沟通者状态整合到该时间表中。我正在使用 GetStatus 方法://msdn.microsoft.com/en-us/library/ms455335.aspx" rel="nofollow">NameCtrl 对象以获取用户状态。当我运行它时,它在 IE 中运行良好。我遇到的问题是,每当小工具遇到 ActiveX 对象声明时,就会出现运行时错误。我知道这一点是因为我将其注释掉并且运行良好。有什么建议吗?
var communicatorPresence = getCommunicatorPresence(userName);
function getCommunicatorPresence(userName){
var obj = new ActiveXObject("Name.NameCtrl.1")
var presence = obj.GetStatus(userName,"")
return presence;
}
我在 Visual Studio 中调试了该小工具并在那里放置了一个断点,错误是“Automation Server 无法创建对象”
I built a gadget that shows an on-call rotation for a team, and I am trying to integrate their communicator presence into that shedule. I am using the GetStatus method from the NameCtrl object to get user presence. It works fine in IE when I run it. The problem I am having is that the gadget has a runtime error whenever it hits the ActiveX object declaration. I know this because I commented it out and it runs fine. Any suggestions?
var communicatorPresence = getCommunicatorPresence(userName);
function getCommunicatorPresence(userName){
var obj = new ActiveXObject("Name.NameCtrl.1")
var presence = obj.GetStatus(userName,"")
return presence;
}
I debugged the gadget in Visual Studio and put a breakpoint there, and the error was "Automation Server can't create object"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据计算机的 UAC 设置,该小工具可能没有对注册表的读/写访问权限。
Depending on the machines UAC settings it might be that gadget does not have read/write access the registry.