首页 > 解决方案 > Cortana Skill - 截取客户端桌面的屏幕截图

问题描述

我使用 MS Bot Framework V4 (Node.js) 构建了 Cortana Skill 并部署在 Azure 中。我可以在支持 Windows 的笔记本电脑中使用 Cortana 调用该技能。

我想触发 Cortana 对运行 Cortana 的客户端桌面进行截图并保存。

不幸的是,Cortana 没有内置的截图功能,所以我想知道这怎么可能。

预先感谢您的建议。

标签: botframeworkcortanacortana-skills-kit

解决方案


幸运的是,Snip and sketch UWP 通过深度链接和晦涩的协议处理程序支持这一点。

     var theURI = encodeURI("ms-screenclip:source=\"cortana\"");
     var msg = new builder.Message(session)
       .text("Taking a screenshot ")
       .speak("Taking a screenshot ")
       .sourceEvent(
           {
               cortana: {
                   action: {
                       type: "LaunchUri",
                       uri: theURI
                  }
               }
           });

推荐阅读