0

尝试制作一个 AppleScript droplet,当文件被拖动到 droplet 时,它将文件移动到给定文件夹;不知道如何告诉脚本我刚刚拖动的文件是我要移动的文件;我试过这个但它不起作用:

on open dragged_file
  tell application "Finder"
  move dragged_file to "Macintosh HD:Users...etc."
  end tell
end open   --script runs but doesn't move file
4

2 回答 2

1

尝试:

on open of theFiles
    tell application "Finder"
        move theFiles to folder "Macintosh HD:Users...etc."
    end tell
end open
于 2012-11-05T15:18:28.800 回答
0

要使用液滴,您必须在 draggeditem 现在在您的脚本中使用 currentitem 引入循环重复,然后以您的示例结束重复

on open dragged_file
 repeat with currentitem in dragged_file
  tell application "Finder"
  move dragged_file to folder "Macintosh HD:Users...etc."
  end tell
end repeat
end open   --script runs but doesn't move file
于 2016-11-12T14:26:29.010 回答