[Gambas-user] multible Processes

Charlie Reinl Karl.Reinl at ...9...
Mon Dec 8 21:15:23 CET 2003


Salut,

I want to write a small programm in gambas, where i compare the output from 
EXEC and SHELL .

so I dit:

PRIVATE myShellProcess AS Process
PRIVATE myEXECProcess AS Process


- made two Textboxes for input
One for the command , and one for the arguments.

- I made 4 Output Textboxes a OUTput for read and one for Error and that twice 
for Exec and SHELL

- a Button [Fire] shall starts all :

PUBLIC SUB btnFire_Click()
DIM sSHELLText AS String
   EXECFeedback.Text = ""
   SHELLFeedback.Text = ""
   EXECError.Text = ""
   SHELLError.Text = ""
   'Trim strips the whitespaces from a string
   IF Trim(InputCom.Text)<> "" THEN
         ' call it with EXEC
         EXEC [Trim(InputCom.Text),Trim(InputArguments.Text)] FOR READ WRITE 
AS myEXECProcess
         ' call it with SHELL
         sSHELLText = Trim(InputCom.Text)+" " + Trim(InputArguments.Text)
         SHELL  sSHELLText FOR READ WRITE AS myShellProcess
   ELSE
      EXECError.Text = "please enter a program to execute"
      SHELLError.Text = EXECError.Text
   ENDIF
END

But how can I catch the Output(s)

??? PUBLIC SUB Process_Read()
??? PUBLIC SUB Process_Error(sStr AS String)

Have I to catch the Process.Id for make the difference ?

Thanks for any hint.

amicalement
Charlie





More information about the User mailing list