未定义变量数据。(-2753)AppleScript

未定义变量数据。(-2753)AppleScript,applescript,Applescript,未定义变量数据-2753 如何修复 set default_path to "Users/mrvisuals/Desktop" set nuntaNume to text returned of (display dialog "Nunta Nume:" default answer "") set nuntaData to text returned of (display dialog "Nunta Data:" default answer "") set folderpath to (c

未定义变量数据-2753 如何修复

set default_path to "Users/mrvisuals/Desktop"
set nuntaNume to text returned of (display dialog "Nunta Nume:" default answer "")
set nuntaData to text returned of (display dialog "Nunta Data:" default answer "")
set folderpath to (choose folder with prompt "Select Folderul Nunti" default location default_path)
set newnuntaFolder to my newFold(nuntaNume, nuntaData, folderpath)
on newFold(theNume, theData, thefolder)
    set subNumeList to {"1.Steps Nunta", "2.STD", "3.TTD", "4.Album", "5.Blog", "6.Des"}
    set itemCount to count of subNumeList
    tell application "Finder"
        set newnuntaFolder to (make new folder at thefolder with properties {name:thedData & "_" & theNume})
        repeat with i from 1 to itemCount
            set thisFolder to make new folder at newnuntaFolder with properties {name:"" & item i of subNumeList}
            if item i of subNumeList contains "1.Steps Nunta" then
                make new folder at thisFolder with properties {name:"1.Pregatiri"}
                make new folder at thisFolder with properties {name:"2.First Look"}
                make new folder at thisFolder with properties {name:"3.Primarie"}
                make new folder at thisFolder with properties {name:"4.Biserica"}
                make new folder at thisFolder with properties {name:"5.Sedinta"}
                make new folder at thisFolder with properties {name:"6.Sala"}
            end if
        end repeat
    end tell
end newFold

处理程序将参数定义为数据:

on newFold(theNume, theData, thefolder)
但您的处理程序稍后将其称为数据:

set newnuntaFolder to (make new folder at thefolder with properties {name:thedData & "_" & theme})

在那一行中,您需要将数据更改为DATA

工作,但我做了一些错误的事情。我希望我们在这一行中设置的名称:“将nuntaNume设置为显示对话框Nunta Nume返回的文本:默认答案”,以包含名称后的所有文件夹和子文件夹。例如:1.步骤Nunta name,2.STD name…….等。修复我的所有问题。把这一行放在所有文件夹中,我就有了名称:“设置thisFolder以在newnuntaFolder创建新文件夹,其属性为{name:&item i of subNumeList&&theNume}”