[Gambas-user] Hours of strugglin with EXEC and SHELL

richard terry rterry at ...1822...
Thu Jan 24 22:14:30 CET 2008


Spent several hours struggling to no avail to understand the exec and shell 
commands including trying to dissect the console program supplied with 
gambas.

Total frustration.

I've selected a file/directory from a file box and that seems to work ok
 
 PRINT FileChooser1.Dir
 PRINT FileChooser1.Value

The file is a zip file, and i want to unzip it in the same directory I 
selected i the box but, if and when (seems erratic) I can unzip it using this 
command:

	SHELL "unzip" & " " & "-P" & "password" & " " & FileChooser1.Value

the unzipped files get deposited in my home directory. Also I want to be able 
to show them inside my terminal. (I tried the READ WRITE combinations at the 
end of that line).

Then I tried things like


           SHELL "cd  /home/richard/coding" WAIT
           SHELL "ls -al" WAIT

and gambas just stops executin, or I tried copying from the console programs 
concepts.


          ' $hProcess = EXEC ["ls"] FOR READ 
          ' $hProcess = EXEC ["cd", "/home/richard/temp"] WAIT
         
Everything to no avail.

I gave up after several hours, but to ease my frustration read 130 pages of 
the Gambas for Beginners pdf which I stumbled across at work today. Though 
based on version 1 it is very useful for me and to contribute to the Author 
I've ordered a paid copy.

Regards and hopeful someone will be able to help me.

Richard




More information about the User mailing list