Run a shell command: multiple instances of stack

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
glenn52
Posts: 25
Joined: Mon May 02, 2011 1:34 pm
Contact:

Run a shell command: multiple instances of stack

Post by glenn52 » Tue Jan 21, 2014 6:25 am

I use a button to run a windows script
get shell (commandline) etc
I have tested the command line in Win cmd & *.bat file and it works flawlessly
I run the script (hit button) in the editor and it works flawlessly
As a standalone, I hit button and a second instance of my standalone app runs in front
Win task manager shows the 2 processes running
Close the latest process and the first one does not complete the script

Any ideas please??

Win 7
LC 5.5.5

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Run a shell command: multiple instances of stack

Post by Klaus » Tue Jan 21, 2014 1:15 pm

Hi Glenn,

not sure what the question is :D

But I guess you want to prevent the second standalone from launching, right?
In that case add a "on relaunch" handler to the stack script:

Code: Select all

on relaunch
  ## do nothing actually :-)
end relaunch
If you do not PASS that message, no other instance of the EXE will be launched!

Best

Klaus

glenn52
Posts: 25
Joined: Mon May 02, 2011 1:34 pm
Contact:

Re: Run a shell command: multiple instances of stack

Post by glenn52 » Tue Jan 21, 2014 10:23 pm

Thanks Klaus, and yes prevent the 2nd instance from launching
I'll try your solution today
Thanks again

If you/anyone knows why this issue arises in I'd be interested to know...

glenn52
Posts: 25
Joined: Mon May 02, 2011 1:34 pm
Contact:

Re: Run a shell command: multiple instances of stack

Post by glenn52 » Wed Jan 22, 2014 1:20 am

Klaus, thanks, works
Still interested to know why this issue arises... :?

Post Reply