[Gambas-user] Xfree4.3 pointers

Benoit Minisini gambas at ...1...
Fri Jan 2 18:21:12 CET 2004


On Friday 02 January 2004 18:43, -=FoX=- wrote:
> Hi all :)

Hi chicken hunter :-)

> I'm writing a little software that allow to change mouse themes.
> But i have 2 little problems:
>
> First, i can't understand when a shell command really finish his job
> For example:
> ...
> Shell "ls /home/myH/.icons/Themes > /home/myH/ERASEMEFILE"

By default, the shell command is launched in background. You must add the WAIT 
keyword at the end of the command - see the documentation.

> Suppose that i want to load the file to read it.
> I try this:
> WHILE NOT Exist("/home/myH/ERASEMEFILE")
> WEND
> OPEN "/home/myH/ERASEMEFILE" FOR READ AS Myfile
> ...
> Sometimes the file result empty... I don't understand... :o

Because the file may exist, but the ls command didn't finish to fill it.

>
> I have another problem regards files managment.
> If i concatenate shells commands, how o can know when the process has
> finished??
> example:
>
> button1.enabled = FALSE
> SHELL "rm /home/myH/temp.txt & cp .... & rm.... & cp...."
> button1.enabled = TRUE

You should read the man page of bash ;-)
& does not concatenate shell commands, it launches them in background.
If you do "command1 & command2 & command3", you launch simultaneously 
command1, command2 and command3, and waits only for the end of the command3 
command.

Try to use ";" instead of "&".

>
> the button is always enabled or i can't see the changes, but the HD
> noise tell me that it has not finished!!
>
> :D
>
> Second question:
> When i change the cursor theme, the mouse remain with his pointers.
> But if i start a new application, the mouse pointers loads correct. (the
> new theme)
> And, waiting a little and moving around, sometimes the new theme loads
> complete.
> I know that the correct way is restarting X-server... but it's ridicule
> imho.
> Any ideas?

No, I don't even know how to change cursors under X11 !

>
> Thanks a lot :)
> Fox
>
> P.s.
> I'm sorry for my bad English :(
>
>

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list