Skip to content

Instantly share code, notes, and snippets.

@monoxgas
Created December 5, 2011 05:43
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/1432455 to your computer and use it in GitHub Desktop.
Save monoxgas/1432455 to your computer and use it in GitHub Desktop.
listen_for /test button/i do
add_views = SiriAddViews.new
add_views.make_root(last_ref_id)
button = SiriButton.new
button.text << "Button1"
newUtterance = SiriAssistantUtteranceView.new("Clicked!")
startRequest = SiriStartRequest.new(newUtterance, false, true)
sendCommand = SiriSendCommands.new
sendCommand.commands << startRequest
#button.commands << SiriSendCommands.new(SiriStartRequest.new(SiriAssistantUtteranceView.new("Clicked!"), false, true))
button.commands << sendCommand
utterance = SiriAssistantUtteranceView.new("Testing Buttons!")
add_views.views << utterance
add_views.views << button
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