0
嗨,我是蘋果手稿的新手,但我試圖做一個獨立的應用程序,根據請求將打開Apple Mail使用是和無列表。我是新手,所以任何幫助將不勝感激。下面附上了我的代碼。如果yes_list然後... applescript
set Unread_Count to unread count of inbox
if Unread_Count is 0 then
say "Sir, it appears you have no new email's"
else if Unread_Count is 1 then
say "You have 1 new email"
else
say "You have " & (get Unread_Count) & " unread emails"
end if
end tell
tell application "SpeechRecognitionServer"
set yes_list to {"yes", "yes open mail", "yes open mail server", "yes please"}
set no_list to {"That's all", "no"}
set answer to listen for yes_list & no_list with prompt "Would you like me to open your mail server? Or will that be all."
-- you have to hold the Listening key (by default ⎋) to record a reply
if answer is no_list then
delay 0.2
say "Very well sir."
end if
if answer is yes_list then
tell application "Mail"
reopen
activate
end tell
end if
end tell
不幸的是,即使我的命令被識別,我的操作仍然不起作用。任何幫助將不勝感激!謝謝!
非常感謝你的魅力! – user2555399