Sub AppStart (Args() As String)
Dim shl As Shell
shl.Initialize("shl", "aplay", Array As String("/tmp/01.wav"))
shl.WorkingDirectory = "."
shl.Run(10000) 'set a timeout of 10 seconds
StartMessageLoop 'need to call this as this is a console app.
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
Log("Success")
Log(StdOut)
Log("Result: " & StdErr)
Else
Log("Error: " & StdErr)
End If
ExitApplication
End Sub