2015-05-21 38 views
1

很简单的问题,但如何从启动脚本“从列表中选择”AppleScript的选择

如:

set issueList to {"1", "2", "2", "4"} 

set selectedIssue to {choose from list issueList} 

if selectedIssue is {"1"} then 
    display dialog "ok" buttons {"1"} default button 1 
else if selectedIssue is {"Holds Charge"} then 
    -- do nothing 
    display dialog "ok" buttons {"2"} default button 1 
else if selectedIssue is {"2"} then 
    -- do nothing 
    display dialog "ok" buttons {"3"} default button 1 
else if selectedIssue is {"3"} then 
    -- do nothing 
    display dialog "ok" buttons {"4"} default button 1 
end if 

我预计在这个剧本的时候我点击的元素该列表,通知开始(或任何其他脚本),但我没有结果。

干杯

回答

2

通知返回{{ “1”}},{不为 “1”}。更改您的代码为

if item 1 of selectedIssue is {"1"} then 

等,它应该工作。

相关问题