[Gambas-user] start gimp via EXEC
Pablo Vera
pvera at ...729...
Thu Dec 23 17:34:02 CET 2004
Remove the quotes from the EXEC command like this:
EXEC [ComboBox1.Text] FOR READ WRITE AS myProcess
You were trying to run a program called: ComboBox1.Text, instead of the program specified by the combobox.
Saludos,
Pablo Vera
Jochen Georges wrote:
>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
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
>
>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/04
More information about the User
mailing list