【发布时间】:2010-02-22 09:33:54
【问题描述】:
我在 OSX Snow Leopard 上(不过,我在 Leopard 上遇到了同样的问题..) 这是小程序:
tell application "Finder" to set my_from to selection
tell application "Finder" to set my_to to target of window 2
tell application "System Events" to keystroke (ASCII character 31)
tell application "Finder" to move my_from to my_to
它将当前选择移动到第二个 Finder 窗口,但在实际移动它之前通过按下箭头前进到下一个文件(我在列表视图中),这样我每次移动时都不会丢失我的位置.
问题是:它每隔一段时间都有效!您实际上必须执行两次才能使其工作!
有人有想法吗?
【问题讨论】:
-
我得到了这个:
error "Finder got an error: Can’t get alias file \"\"." number -1728 from alias file ""。 ??
标签: macos scripting applescript finder