shell() in a separate thread with callback message at exit?

Dave dave at
Thu Mar 8 06:31:19 EST 2007


What platforms are you supporting?

If it is Mac only then I think you can achieve this using an  
AppleScript and AppleEvents.

Let me know and I'll let you have more details.

All the Best

On 8 Mar 2007, at 11:20, Joel Guillod wrote:

> How can I implement the following features:
> - invoque a shell command in a separate thread, i.e. a non blocking  
> shell during execution of the command;
> - receive a callback message with the output and the error result  
> when the thread exits?
> This would be some function similar to the load command, i.e.:
>    shellExecute commandLine [with message callbackMessage]
> where
>   The commandLine is a string or an expression that evaluates to a  
> string.
>   The callbackMessage is the name of a message to send after the  
> shell exited.
> The callbackMessage signature would be:
>   on <callbackMessage> pCmdOutput,pCmdError,pShellError
> where
>   - pCmdOutput is the value returned by the shell function, i.e.  
> the result of the sdtout commandLine, including any error messages  
> the commandLine generates.
>   - pCmdError is the error the command generate (sdterr under unix).
>   - pShellError is the shell command's exit code.
> If I remember well the externals API allows for such threading and  
> callback but I am not a C expert. Could anyone give me refs/ 
> pointers to a solution? I need a multiplatform solution.
> Thanks a lot !  Joël
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:

More information about the Use-livecode mailing list