[Gambas-user] Shell command formating

T Lee Davidson t.lee.davidson at ...626...
Mon Aug 7 16:00:38 CEST 2017


On 08/06/2017 09:52 PM, Shane wrote:
> So again on the shell command I have this code
> 
> Dim result As String
> Dim command As String
> 
> path = File.SetExt(file_name, "ihx")
> 
>   command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path
> 
> Shell command To result
> 
> FMain.TextArea1.Text = result
> 
> but the output is going to stdout and not the result String i know it to do with the command string
> 
> but now do you set it up ?
> 
> Thanks Shane..
> 

Perhaps the output is actually going to stderr for some silly reason. Maybe try redirecting stderr to stdout:

command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>&1"


-- 
Lee




More information about the User mailing list