Stop Livecode waiting for script to finish
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Stop Livecode waiting for script to finish
Hi,
Im using Livecode to run a few Batch files and scripts, but once I press the button the whole application freezes until the script completes, is there a way to tell livecode not to wait for the shell command/script to complete.
Thanks in Advance
Im using Livecode to run a few Batch files and scripts, but once I press the button the whole application freezes until the script completes, is there a way to tell livecode not to wait for the shell command/script to complete.
Thanks in Advance
Re: Stop Livecode waiting for script to finish
its ok, worked it out - rather than get shell I can use open process which works.
Thanks
Thanks
Re: Stop Livecode waiting for script to finish
Hi Chris,
yep, SHELL calls are blocking in LC, unfortunately!
Should be mentioned in the docs!
Best
Klaus
yep, SHELL calls are blocking in LC, unfortunately!
Should be mentioned in the docs!
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Stop Livecode waiting for script to finish
I believe the Dictionary entry for the shell function notes that the handler will stop until the shell call returns.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Stop Livecode waiting for script to finish
Know or believe?FourthWorld wrote:I believe the Dictionary entry for the shell function notes that the handler will stop until the shell call returns.
Yep, that is in fact mentioned in the docs, but it should be in BOLD 72 point letters!
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Stop Livecode waiting for script to finish
You're welcome to submit an enhancement request for that Dictionary change.Klaus wrote:Yep, that is in fact mentioned in the docs, but it should be in BOLD 72 point letters!
But if we do that for everything that may not be immediately self-evident, well, it's a big language - likely a lot of 72-point type would wind up there.
When I run a shell command within Terminal, everything else there stops until that command completes. And when we consider that most things in LiveCode are blocking, it may be better to use large type to note the relatively few cases where things are non-blocking.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Stop Livecode waiting for script to finish
Is there a way to launch external .exe file and continue to execute script in LiveCode without blocking?