B4J Question Call B4J app from windows command with parameter

bogdanc

Active Member
Licensed User
Longtime User
Hi All!

How to pass a parameter to b4j app (compiled as exe ) and execute some part of code.?

wind_cmd.PNG


Or if is a difrent way / idea how to get interactions between two aps. Like b4j and labview.

Regards
 
Last edited:

bogdanc

Active Member
Licensed User
Longtime User
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
you can use httputils and download the html/js and process it asyncronously:
B4X:
Sub AppStart (Args() As String)
    Dim job1 As HttpJob

    job1.Initialize("Job1", Me)
    job1.Download("https://www.b4x.com/")
    StartMessageLoop
End Sub

Sub JobDone (Job As HttpJob)
    Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
    If Job.Success = True Then
        Select Job.JobName
            Case "Job1"
'                'do something with the string
                Log(Job.GetString)
        End Select
    Else
        Log("Error: " & Job.ErrorMessage)
    End If
    Job.Release
End Sub
 
Upvote 0
Top