变量 thedData 未定义。 (-2753) AppleScript

The variable thedData is not defined. (-2753) AppleScript

未定义变量 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

您的处理程序将参数定义为 theData:

on newFold(theNume, theData, thefolder)

但您的处理程序稍后将其称为 thedData:

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

在那一行中,您需要将 thedData 更改为 theData