I have a Utility function for this purpose. You're welcome to use it...
Function ShowMessageBox( title As String, message As String, buttons = [ "OK" ] )
messageBox = CreateObject( "roMessageDialog" )
messageBox.SetMessagePort( CreateObject( "roMessagePort" ) )
messageBox.SetTitle( title )
messageBox.SetText( message )
For buttonIndex = 0 To buttons.Count() - 1
messageBox.AddButton( buttonIndex, buttons[ buttonIndex ] )
Next
messageBox.Show()
While True
msg = wait( 0, messageBox.GetMessagePort() )
If msg <> invalid Then
If Type( msg ) = "roMessageDialogEvent" Then
If msg.IsButtonPressed() Then
Return buttons[ msg.GetIndex() ]
End If
End If
End If
End While
End Function
In your case, you'd call it like this...
result = ShowMessageBox("Confirm", "Are you sure you want to blah blah blah?", [ "Yes", "No" ])
If result = "Yes" Then
'Do that thing...
End If
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)