I have the following AppleScript so far:
# 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
I am trying to say if option 1 is selected in list 1 display only the selected task, however, if any other option is selected in list 1 you have to move to the new code block, and must select an option in list 2, if you cancel on list 1 and list 2 you screwed up.
Any ideas on what I am missing here?