我想使用两个简单的按钮单击来生成“部门”和“套件”的变量。单击一次按钮应根据“部门”的返回值创建另一组按钮选项 为什么这不起作用?
--set up departments and suites
property departments : {"Audio", "Video", "Digital"}
property suites_Audio : {"A1","A2", "A3", "TXFR"}
property suites_Video : {"VFX1", "VFX2", "FCP1", "FCP2", "Flame1", "Flame2"}
property suites_Digital : {"MCR", "Encoding", "Store"}
--get suite location
display dialog "Enter your department" buttons departments
set department to button returned of the result
set suites to "suites_" & department
display dialog "Enter your suite" buttons {suites}
set suite to button returned of the result
我对这两行的语法有一种感觉:
set suites to "suites_" & department
display dialog "Enter your suite" buttons {suites}
因此,单击正确的部门应该会生成一组新的按钮,以便从顶部的套件属性中向下挖掘到正确的套件。
有人可以帮忙吗?