Variables Applescript如何显示包含文本和变量的对话框

Variables Applescript如何显示包含文本和变量的对话框,variables,text,dialog,applescript,var,Variables,Text,Dialog,Applescript,Var,我需要显示一个带有文本和数字的applescript对话框,我的意思是它显示的文本将是文本和一个变量,如显示对话框“输入拼写”和repeatnum按钮{“完成”}这是我的代码`显示对话框“有多少拼写”按钮{“该数量”}默认答案“” 当我尝试此操作时,会出现以下错误:无法将拼写输入布尔类型,是否仍要使applescript对话框显示文本和变量尝试: display dialog "How many spellings are there" buttons {"That amount"} defau

我需要显示一个带有文本和数字的applescript对话框,我的意思是它显示的文本将是文本和一个变量,如
显示对话框“输入拼写”和repeatnum按钮{“完成”}
这是我的代码`显示对话框“有多少拼写”按钮{“该数量”}默认答案“”

当我尝试此操作时,会出现以下错误:无法将拼写输入布尔类型,是否仍要使applescript对话框显示文本和变量

尝试:

display dialog "How many spellings are there" buttons {"That amount"} default answer ""
set amount to text returned of result

set repeatdone to 0
repeat amount times
    set repeatdone to repeatdone + 1
    display dialog "enter spelling " & repeatdone buttons {"Ok"} default answer ""
end repeat
display dialog "How many spellings are there" buttons {"That amount"} default answer ""
set amount to text returned of result

set repeatdone to 0
repeat amount times
    set repeatdone to repeatdone + 1
    display dialog "enter spelling " & repeatdone buttons {"Ok"} default answer ""
end repeat