audio - applescript:使用Finder move 文件时避免声音

标签 audio applescript move

我正在尝试处理Applescript中的许多文件。这包括搬家
每个文件到工作目录进行处理

当我的脚本执行时

tell application "Finder"
    move  file to workdir
end tell

它总是会发出声音(就像使用finder GUI dos移动文件一样)
我该如何预防?该脚本可能会运行多个小时,并且该脚本不断发出叮叮声会令人不安。我无法完全关闭声音,因为其他事情可能需要提醒我

最佳答案

由于您在OP中明确声明“我无法完全关闭声音,因为其他事情可能需要提醒我”,因此建议您使用系统事件的磁盘文件夹文件套件中的move命令,因为它不会使使用此方法的任何声音。

movev : Move disk item(s) to a new location.

      move disk item : The disk item(s) to be moved.
            to location specifier : The new location for the disk item(s).
            → disk item



示例:
set thisItem to "/path/to/disk item"
set thisFolder to "/path/to/folder"

tell application "System Events"
    move disk item thisItem to thisFolder
end tell

关于audio - applescript:使用Finder move 文件时避免声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48484949/

相关文章:

audio - 有没有一种方法可以在JythonMusic中设置帧速率或单个帧间距?

arrays - 通过从as3中的库文件制作数组来播放声音?

xcode - 如何在 XCode 中快速删除/* 和 */

swift - 从 Swift 运行 AppleScript 不工作

google-apps-script - Google 表格脚本 - 将行从一个选项卡 move 到另一个选项卡

audio - Nativescript 录制音频

python - 如何将 mp3 音频文件截断 30%?

shell - AppleScript 和 MD5

c++ - 隐式 move 方法是否始终保留基本数据?

python - 通过单击其中一个来 move 多个矩形