Applescript:“预期结束但找到标识符”

时间:2011-12-05 00:39:11

标签: applescript

我在一个有人要我编辑的简短脚本中有一些AppleScript代码:

repeat with i from 1 to nDirs
    set impf to folder i of importFolder
    my convertFolder(impf,exportFolder,userValue)
end repeat

每当我尝试保存或编译它时,AppleScript编辑器会告诉我“语法错误:预期行结束但找到标识符”,同时指向小'i'。我的impf绑定语法是不正确的?如何编写此脚本?

1 个答案:

答案 0 :(得分:0)

folder更改为item

我假设您只想"转换"文件夹,所以添加"错误检查" (在这种情况下,文件夹检查)在调用convertFolder ...

之前
if (impf as string) ends with ":" then my convertFolder(impg, exportFolder, uservalue)
--Alias references ending with a ':' indicate that the item is a folder
相关问题