Skip to content

Instantly share code, notes, and snippets.

@monoxgas
Created December 10, 2011 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monoxgas/1455623 to your computer and use it in GitHub Desktop.
Save monoxgas/1455623 to your computer and use it in GitHub Desktop.
filter "StartRequest", direction: :from_iphone do |object|
puts "[Info - Button Information] #{object["properties"]}"
say "I don't have any #{object["properties"]["utterance"].capitalize} muffins, sorry..." #Fails Here, Logs the Say but never actually says it
object = false #After a while, it will google search my utterance I used
end
def createButton(text, utterance, command)
startRequest = SiriStartRequest.new(text, false, true) #Does the true proxyOnly parameter matter here?
sendCommand = SiriSendCommands.new
sendCommand.commands << startRequest
button = SiriButton.new(text)
button.commands << sendCommand
return button
end
listen_for /Button Test/i do
add_views = SiriAddViews.new
add_views.make_root(last_ref_id)
utterance = SiriAssistantUtteranceView.new("Choose a Muffin:")
add_views.views << utterance
add_views.views << createButton("Blueberry")
add_views.views << createButton("Chocolate")
add_views.views << createButton("Pumpkin")
add_views.views << createButton("Plain")
send_object add_views
request_completed
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment