B4J Question How to Send commands to a jShell opened Program

Discussion in 'B4J Questions' started by Cal4th, Jan 7, 2018.

  1. Cal4th

    Cal4th Member

    I already Run the aplication.exe i wanted to run with jShell, know i want to rite some commands so that they are automatically done in the aplication I opend.
    Is there a way to do this? if so How?

    the Code to run the app is:
    Code:
    Sub btnRun_MouseClicked (EventData As MouseEvent)
       
        
    Dim xfoil As Shell
        
    Dim params As List
        
    Dim FileRun As String
        params.Initialize
        params.Add(
    File.DirApp)
        params.Add(
    "Load naca0015.txt")
       
        FileRun= 
    File.Combine(File.DirApp& "\Xfoil""xfoil.exe")
        
    Log(FileRun)
    '  
    '    xfoil.Initialize("xfoil",FileRun, Null)
        xfoil.Initialize("xfoil",FileRun, params)
        xfoil.WorkingDirectory = 
    File.DirApp
        xfoil.Run(-
    1)

    End Sub
     
    Sub xfoil_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
        
    If Success And ExitCode = 0 Then
            
    Log("Success")
            
    Log(StdOut)
        
    Else
            
    Log("Error: " & StdErr)
        
    End If
        
    ExitApplication
    End Sub
     
  2. rboeck

    rboeck Well-Known Member Licensed User

  3. Cal4th

    Cal4th Member

    Perfect, thanks.

    Is there a link where they list the library a little bit more, that with the thread you sent me there is not a lot of info.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice