0

can someone help.

tell application "SpeechRecognitionServer"
    set theResponse to listen for {"open (said application)", "who are you"} with prompt "Hello... I am ready"
    if theResponse is "open" then
        tell application "Minecraft" to activate
    else
        if theResponse is "who are you" then
            say "i am Ray"
        end if  end if
end tell
end 

** i don't know how to make it so if you say open (name of application eg App Store) how can i do that rather than writing out a bunch of answers for that and also the line below that that says tell application "said application" to activate. is this possible? **

  • The SpeechRecognitionServer just uses fixed words and phrases, so you will need to define and process each of them. – red_menace Jun 24 at 12:32
  • ok thank you that will then take time but hay ho – Arc11221 Jun 24 at 13:12
  • One way to not get lost would be to create a controller script that contains handlers for the various commands, and set up a property list to use the different strings to look up their matching handlers (I did this with Xcode many moons ago). – red_menace Jun 24 at 15:49

You must log in to answer this question.

Browse other questions tagged .