I can get values from the Listbox.
The addItem seems to do nothing .
The ListBox read-only option is set to No.
The “\” is a temporary Return key test substitute.
Sub Run_Cmd
BasicLibraries.LoadLibrary(“Tools”)
oDialog1 = LoadDialog(“Standard”, “cmd”)
oDialog1Model = oDialog1.Model
rslt = oDialog1.GetControl(“ListBox1”)
cmd = oDialog1.GetControl(“TextField1”).Text
if instr(cmd,"\") > 0 then
cmd = "/home/june/lgr.sh" & " '" & left(cmd,len(cmd) - 1) & "'"
msgbox(cmd)
shell("/usr/bin/bash",0,cmd, true)
open "/home/june/lst" for input as 1
While Not eof(1)
Input #1, sLine
iCount = rslt.ItemCount
msgbox(iCount)
rslt.addItem(sLine,iCount)
Wend
Close #1
end if
end sub