is possible send from batch file more of one parameter at non UI application ?
i have tested with one parameter and works, but i don't know how to setting other ARGS() in code.
B4X:
#Region Project Attributes
#CommandLineArgs: test
#End Region
Sub Process_Globals
Dim p1 As String
End Sub
Sub AppStart (Args() As String)
p1 = Args(0)
End Sub
thanks... works
i have another problem because the second string have words that are not contiguous, then they are viewed as parameters, so the second parameter would be a string with multiple words ... can you solve this?
'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs: Test1 "Test2 param1"
#MergeLibraries: True
#End Region
Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
For Each S As String In Args
Log(S)
Next
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
You will need to parse the string to get the parameters