未定义变量thedData。 (-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
答案 0 :(得分:0)
您的处理程序将参数定义为Data:
on newFold(theNume, theData, thefolder)
但您的处理程序稍后将其称为thedData:
set newnuntaFolder to (make new folder at thefolder with properties {name:thedData & "_" & theme})
在该行中,您需要将dData更改为Data