Stop Livecode waiting for script to finish

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
ChrisM
Posts: 24
Joined: Sat Mar 29, 2014 3:11 pm

Stop Livecode waiting for script to finish

Post by ChrisM » Mon Aug 03, 2015 1:51 pm

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

ChrisM
Posts: 24
Joined: Sat Mar 29, 2014 3:11 pm

Re: Stop Livecode waiting for script to finish

Post by ChrisM » Wed Aug 05, 2015 6:08 pm

its ok, worked it out - rather than get shell I can use open process which works.

Thanks

Klaus
Posts: 12216
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Stop Livecode waiting for script to finish

Post by Klaus » Thu Aug 06, 2015 11:53 am

Hi Chris,

yep, SHELL calls are blocking in LC, unfortunately!
Should be mentioned in the docs!


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Stop Livecode waiting for script to finish

Post by FourthWorld » Thu Aug 06, 2015 3:09 pm

I believe the Dictionary entry for the shell function notes that the handler will stop until the shell call returns.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 12216
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Stop Livecode waiting for script to finish

Post by Klaus » Thu Aug 06, 2015 4:09 pm

FourthWorld wrote:I believe the Dictionary entry for the shell function notes that the handler will stop until the shell call returns.
Know or believe? :D

Yep, that is in fact mentioned in the docs, but it should be in BOLD 72 point letters!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Stop Livecode waiting for script to finish

Post by FourthWorld » Thu Aug 06, 2015 4:18 pm

Klaus wrote:Yep, that is in fact mentioned in the docs, but it should be in BOLD 72 point letters!
You're welcome to submit an enhancement request for that Dictionary change. :)

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 Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Stop Livecode waiting for script to finish

Post by Ultravibe » Fri Oct 23, 2015 1:19 pm

Is there a way to launch external .exe file and continue to execute script in LiveCode without blocking?

Post Reply

Return to “Windows”