到目前为止,我有以下AppleScript :
# List of possible options to control the development environment.
set WhatDoUWantToDoList to {"1", "2", "3", "4"}
set MySites to {"test1", "test2"}
# task selected
set selectedTask to {choose from list WhatDoUWantToDoList with prompt "Pick your task now!!!" without multiple selections allowed}
if selectedTask is equal to {"1"} then
display dialog selectedTask
else
# site selected
set selectedSite to {choose from list MySites with prompt "Pick the site your working on!!!"}
if (selectedTask is not equal to false and selectedSite is not equal to false) then
display dialog selectedTask
display dialog selectedSite
else
display dialog "you messed up!"
end if
end if
我想说的是,如果在列表 1 中选择了选项 1,则仅显示所选任务,但是,如果在列表 1 中选择了任何其他选项,则必须移至新代码块,并且必须在列表 2 中选择一个选项,如果您取消了清单 1 和清单 2,您搞砸了。
关于我在这里缺少什么的任何想法?