2

使用以下代码:

tell application "Finder" to reveal every item of theFiles

当 theFiles 包含单个文件时有效,但当它包含多个文件时,我得到:

error "Finder got an error: AppleEvent handler failed." number -10000

我究竟做错了什么?我只是想在 Finder 中突出显示文件列表。

4

2 回答 2

2

这似乎有效:

tell application "Finder" to reveal theFiles

我正在查看的一个示例显示“......揭示......的每一项”。我不确定他们是否有错误或 AS 发生了某些变化。

于 2010-06-25T05:47:08.563 回答
1

这似乎工作正常

  tell application "Finder"
    set theFiles to entire contents of folder of (choose folder)
    reveal every item of theFiles
  end tell
于 2010-06-25T14:07:56.163 回答