[Gambas-user] start gimp via EXEC
Jochen Georges
jochengeorges at ...467...
Thu Dec 23 17:24:58 CET 2004
Hello gambanauts,
I want to start gimp via EXEC, the following code does not work, but it does
not throw an error messeges.
Any hints ?
Thanks in advance.
Beste Gruesse
Jochen
PRIVATE myProcess AS Process
PUBLIC SUB _new()
ME.Title = "Working with EXEC"
ComboBox1.add("/usr/bin/X11/xcalc")
ComboBox1.add("gimp")
END
PUBLIC SUB btnFire_Click()
IF Trim(ComboBox1.Text) <> "" THEN
'Trim strips the whitespaces from a string
TextArea1.Text = ""
TextArea2.Text = ""
EXEC ["ComboBox1.Text"] FOR READ WRITE AS myProcess
ELSE
TextArea1.Text = "please choose or enter a program to execute"
ENDIF
END
PUBLIC SUB btnClose_Click()
ME.Close()
END
PUBLIC SUB Process_Write(sData AS String)
' if something is coming back
' the event 'Process.Write' of the class process calls this function
TextArea2.Text = " Process '" & myProcess.command & "' " & sData
END
PUBLIC SUB Process_Error(sData AS String)
' if an error occurred
' the event 'Process.Error' of the class process calls this function
TextArea1.Text = " Process '" & myProcess.command & "' " & sData
END
PUBLIC SUB Process_Kill()
' if the process is killed
' the event 'Process.Kill' of the class process calls this function
myProcess = NULL
END
More information about the User
mailing list