[Gambas-user] capture gambas debug console events?
mikeB
mb at code-it.com
Tue Nov 14 16:15:37 CET 2017
This is what I have ended up doing - so problem is now solved.
Dim GP as String
GP = MaskBox5.text
Shell "steghide embed -cf " & TextBox2.text & " -ef " & TextBox3.text &
" -p " & GP & " > embed_results.txt"
this creates a file that contains the terminal results - I never knew
this was possible - a great thing to learn!
then I display the created file into a textarea box to display the
status then kill it. Suggestion to direct to a string might of been
better - I'll experiment with that too;-)
thanks for all the replies - I learned a lot of what I consider
important info since I'm doing a lot of shelling out to the terminal in
some/ most apps I'm developing.
have a GREAT day and a BIG THANKS to all again,
mikeB
On 11/14/2017 05:42 AM, Fabien Bodard wrote:
> T Lee Davidson ... well it seem i have not exactly understand the
> content of the query :-).
>
> The ascynchronous version.
>
>
> hprocess = EXEC["steghideCommand"] for Read Write as "Process"
>
>
> Public sub Process_Error(sError as string)
>
> Print sError
>
> end
>
> 2017-11-14 13:28 GMT+01:00 T Lee Davidson <t.lee.davidson at gmail.com>:
>> You might also try simply redirecting stderr to stdout and capturing both to
>> a string:
>>
>> Shell "steghideCommand 2>&1" to myString
>>
>>
>> --
>> Lee
>>
>>
>> On 11/14/2017 05:39 AM, Fabien Bodard wrote:
>>>
>>> in desing module between line 988 - 995
>>>
>>>
>>>
>>> If sProg Then
>>> $hProcess = Exec aExec With aEnv As "Process"
>>> Else
>>> '$hProcess = Exec aExec With aEnv For Input Output As "Process"
>>> $hProcess = FOutput.GetTerminal().Exec(aExec, aEnv)
>>> $hProcess.Term.Echo = True
>>> $hObserver = New Observer($hProcess, True) As "Process"
>>> Endif
>>>
>>>
>>>
>>> here you can add an observer again and scan the returned values.
>>>
>>>
>>>
>>>
>>> 2017-11-13 18:24 GMT+01:00 mikeB <mb at code-it.com>:
>>>>
>>>> eGreetings to the world of Gambas,
>>>> I have a app, that I'm trying to develop, that shells out to "Steghide"
>>>> among other things. The problem I need to resolve (if possible) is
>>>> to capture any errors messages that occur during the "Strghide" process.
>>>>
>>>> I'm probably just dreaming that this may be done but...
>>>> The Gambas debug console captures the errors - is there any way to code
>>>> it
>>>> so that the debug messages can be transferred/ captured then displayed in
>>>> a
>>>> label (or somewhere) on the main form of the project?
>>>> As far as getting the error message from the terminal (shell to
>>>> steghide")
>>>> then showing on the main form - I find no way ;-(
>>>
>>>
>>> There is many ways in fact. You need just to capture the
>>>
>>>>
>>>> Thanks for any/ all help to resolve (or not) this matter,
>>>> mikeB
>>>>
>>>> --------------------------------------------------
>>>>
>>>> This is the Gambas Mailing List
>>>> https://lists.gambas-basic.org/listinfo/user
>>>>
>>>> Hosted by https://www.hostsharing.net
>>>
>>>
>>>
>>>
>>
>> --------------------------------------------------
>>
>> This is the Gambas Mailing List
>> https://lists.gambas-basic.org/listinfo/user
>>
>> Hosted by https://www.hostsharing.net
>
>
>
More information about the User
mailing list