shell() in a separate thread with callback message at exit?
Joel Guillod
joel.guillod at net2000.ch
Mon Mar 12 11:50:10 EDT 2007
> Here is an example script that does a ping. The handler includes the
> post-processing of the result, but you can just ignore that.
>
> function checkPing pIP
> ...
> put "ping -c1 -n " & pIP into tShellCmd
> put " > " & tFileName & " 2>&1 &" after tShellCmd
Thank you a lot Sarah. Your code let me discover the "wait .. with
messages" which I have never been aware of (the old Hypercard
practice?). This can actually do the job I am searching for. Also,
your example raises two questions:
1.- Is there somewhere some documentation on synchronous/asynchronos
parallel/threaded Transcript execution? I would like to learn about
other such great features native in Transcript...
2.- I understand the shell command you wrote up to "ping -c1 -n
192.168.0.1" and even the "&" mandatory for executing the shell in a
separate thread but I dont understand the "2>&1 &". Could you
explain? Do you have a good MacOSX/Un*x tutorial on the shell commands?
Best to you,
Joël
More information about the use-livecode
mailing list