OSX Lion Preview 应用程序是否可以编写脚本?

编程入门 行业动态 更新时间:2024-10-20 16:47:11
本文介绍了OSX Lion Preview 应用程序是否可以编写脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

OSX Lion(或旧版 OSX)预览版是否可以编写脚本?

解决方案

Preview 现在不是,而且从来没有 AppleScript-able,这确实很糟糕.不过如果是这样就好了.

<块引用><块引用>

来自本博客:

然而,从 10.4-10.6 可以启用默认的 Cocoa通过这些终端命令支持脚本:

sudo 默认写入/Applications/Preview.app/Contents/InfoNSAppleScriptEnabled -bool 是须藤 chmod a+r/Applications/Preview.app/Contents/Info.plist

<块引用>

这足以能够获取当前文档的文件以将其删除,更改它的 Finder 标签,将其导入 EagleFiler 等.在 10.7 下,修改 Info.plist 文件会破坏应用程序的代码签名.我希望这会在控制台,但它实际上导致预览崩溃.

Is OSX Lion (or older OSX) release of Preview scriptable?

解决方案

Preview is not now, and have never been AppleScript-able, which does suck. It'd be nice if it were, though.

From this blog:

However, from 10.4–10.6 it was possible to enable the default Cocoa scripting support via these Terminal commands:

sudo defaults write /Applications/Preview.app/Contents/Info
NSAppleScriptEnabled -bool YES 

sudo chmod a+r /Applications/Preview.app/Contents/Info.plist 

This was sufficient to be able to get at the file of the current document to delete it, change its Finder label, import it into EagleFiler, etc. Under 10.7, modifying the Info.plist file breaks the application’s code signature. I would expect this to cause a harmless warning message in the Console, but it actually causes Preview to crash.

这篇关于OSX Lion Preview 应用程序是否可以编写脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-17 15:04:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/915875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   脚本   OSX   Lion   Preview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!