MAC 操作系统更新后 Applescript 错误 -4960

发布于 2025-01-18 11:55:06 字数 646 浏览 2 评论 0原文

当我尝试运行此操作作为更大脚本的一部分时,我会遇到错误。不喜欢“到文件夹”。我最后改变的唯一变化是对Mac OS操作系统的更新(目前在Big Sur 11.6.5上)。

tell application "Finder" to set myFolders to the folders of theDestinationFolder

set folderCount to count myFolders
set loggingCounter to 0

repeat with aFolder in myFolders
    set progress description to "Processing folder " & (loggingCounter + 1) & " of " & folderCount
    set progress additional description to ""
    set progress total steps to folderCount
    set progress completed steps to loggingCounter
    
    organizeSubfolder(aFolder)
    
    set loggingCounter to loggingCounter + 1
    
end repeat

I keep getting an error when I try to run this as part of a much bigger script. Doesn't like "to the folders". Only thing that changed on my end was an update to the MAC OS operating system (currently on Big Sur 11.6.5).

tell application "Finder" to set myFolders to the folders of theDestinationFolder

set folderCount to count myFolders
set loggingCounter to 0

repeat with aFolder in myFolders
    set progress description to "Processing folder " & (loggingCounter + 1) & " of " & folderCount
    set progress additional description to ""
    set progress total steps to folderCount
    set progress completed steps to loggingCounter
    
    organizeSubfolder(aFolder)
    
    set loggingCounter to loggingCounter + 1
    
end repeat

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文