使用 Apple 脚本取消选择默认屏幕截图选项
我正在尝试制作一个苹果脚本,通过它我可以取消选择此选项:“
系统偏好设置”>“硬件>键盘>键盘快捷键>屏幕截图>将所选区域的图片保存为文件
有人可以建议我一些示例脚本吗?
谢谢,
米拉杰
I am trying to make an apple script through which I can deselect this option:
System Preferences > Hardware > Keyboard > Keyboard Shortcuts > Screen Shots > Save picture of selected area as a file
Can anyone suggest me some sample script for it?
Thanks,
Miraaj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,系统首选项不可编写脚本。您将必须使用 GUI 脚本,但这对每个人来说都会有点不同,具体取决于他们安装的首选项。 www.macosxautomation.com 上有一个很好的示例,可以帮助您开始了。
System Preferences are not scriptable by default. You will have to use GUI Scripting, but that will be a little bit different for everyone depending on what preferences they have installed. There is a an excellent example over at www.macosxautomation.com that will get you started.
我对此有点晚了,但是,这对我有用:
请注意,这会禁用所有复选框,而不仅仅是“将选定区域的图片保存为文件”。要仅禁用该功能,请将重复块替换为:
您可以通过将
row 4
替换为正确快捷方式的行号来启用或禁用任何其他屏幕截图快捷方式I am a bit late to this but, here's what worked for me:
Note this disable all checkboxes and not just "Save picture of selected area as a file". To disable just that replace the repeat block with:
You can enable or disable any other screenshot shortcut by replacing
row 4
with the row number of the correct shortcut