[Gambas-user] Stopping a CLI program

John Rose john.aaron.rose at ...626...
Wed Dec 11 14:16:25 CET 2013


Tobias,

Thank you for your reply.

The reason for my using "-f x11grab" as one parameter (rather than 2 
parameters of  "-f" & "x11grab") to the Exec command is that I was 
thinking of that string as being one parameter to ffmpeg. It would help 
if the documentation had an Exec example with these type of parameters 
as Unix command line programs often use parameters consisting of a 
hyphen followed by a letter followed by a value.

Re If hffmpeg and hffmpeg.State = Process.Running Then Print #hffmpeg, 
"q", the error was "Type mismatch" & I forget the rest. I should have 
put this in my posting. I didn't understand what I should change this 
code to from your reply:
The reason is that you wrote "hffmpeg and hffmpeg.State = 
Process.Running". In Gambas, the And operator "pulls stronger" than the 
equals operator because And is a binary operator in Gambas. So your code 
is equivalent to

I meant to say: And is a*bitwise*  operator in Gambas.

Public Sub ffmpegMessages_Error(sError As String) solved the compilation 
problem with Public Sub ffmpegMessages_Error(sError). I looked up the 
documentation on Error and it said that "EVENT *Error* ( _Error_ AS 
String )" which I incorrectly interpreted as meaning that the type of 
Error is automatically String and thus that there is no need to specify 
its type. This is due to my not being sufficiently acquainted with event 
driven / OO languages.

Re your comments of "I'm tired of explaining this... Is the 
documentation really _that_ unclear?", "Oh, there was an error? Your 
chances to not annoy people are better if you also write down _what_ 
error it was. ", and "Have you ever written a function in Gambas?": 
these sort of comments can come across as sarcasm & insults which may 
lead to heated conversations. Please remember that many of the people 
using Gambas at home are not professional developers e.g. I have not 
done any development at work for approx 30 years - I was a Business & 
Systems Analyst as well as a University Lecturer in Information Systems. 
At work, I often saw developers make this type of comment to end users & 
I had to calm things down as otherwise all co-operation from those users 
would have gone.

Perhaps there should be 2 mailing lists: one for professional developers 
& one for non-professional developers.

-- 
Regards, John



More information about the User mailing list