【问题标题】:Applescript how to display a dialog with text and a variableApplescript如何显示带有文本和变量的对话框
【发布时间】:2013-12-18 16:34:04
【问题描述】:

我需要显示一个带有文本和数字的applescript对话框,我的意思是它显示的文本将是文本和像这样的变量display dialog "Enter spelling" and repeatnum buttons{"done"}这是我的代码`isplay dialog“有多少拼写" 按钮 {"那个数量"} 默认答案 ""

set amount to text returned of result

set repeatdone to 0

repeat amount times

    repeatdone = repeatdone + 1

    display dialog "enter spelling " and repeatdone buttons {"Ok"} default answer ""

end repeat

当我尝试这个时,它给了我错误,无法将输入拼写为布尔类型,无论如何要让 applescript 对话框显示文本和变量

【问题讨论】:

    标签: variables text dialog applescript var


    【解决方案1】:

    试试:

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多