B4J Question B4J & DOS Shell

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code will open a dos shell:
B4X:
Sub Process_Globals
   Private fx As JFX
   Private MainForm As Form
   Private shl As Shell
End Sub

Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.Show
   shl.Initialize("shl", "cmd.exe", Array As String("/c", "start"))
   shl.Run(-1)
End Sub

Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
   Log(Success)
End Sub
 
Upvote 0
Top