PY-appscript开始一个新的Finder实例 [英] py-appscript is starting a new Finder instance
问题描述
我有一个py2app应用程序,它运行用py-appscript的appscript。该AppleScript的code是这一行:
i have a py2app application, which runs an appscript using py-appscript. the Applescript code is this one line:
应用程序('搜索')更新。(小于某个文件&GT的文件别名;)
这有什么不正常的更新是在Finder中文件的preVIEW。它工作的大部分时间,除了豹。在Leopard中,每次该脚本执行,而不是更新的文件,它启动搜索的新实例。我究竟做错了什么?这个应用程序是建立在同一台机器(豹)上。
What this normally does is update a file's preview in Finder. It works most of the time, except for Leopard. In Leopard, everytime that script is executed, instead of updating the file, it starts a new instance of Finder. What am I doing wrong? The app was built on the same machine (the Leopard).
推荐答案
看到如何PY-appscript是蟒蛇和应用程序,您都可以通过AppleScript的脚本之间的一层,我会建议移植语句纯AppleScript的,看看它是否在那里工作。有很多事情可以去错了AppleScript的(和孤独的语句)开始与这不是什么很明显的是与PY-appscript当发生错误之前预期。
Seeing as how py-appscript is a layer between python and the application you are scripting via Applescript, I would suggest porting the statement to pure Applescript and see if it works there. There are a lot of things that can go wrong with Applescript (and your statement alone) to begin with and it's not obvious what is the expected before with py-appscript when an error occurs.
这篇关于PY-appscript开始一个新的Finder实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!