Page 1 of 1
Launch another application with Launch command
Posted: Wed Nov 16, 2016 5:08 pm
by mrcoollion
I am trying to make a stack that launches another application.
Seems to be easy but no luck so far.
Can anybody tell me what I am doing wrong?
I attached an ApplicationLauncher and AppToLaunch stacks for testing.
Regards,
Paul
Re: Launch another application with Launch command
Posted: Wed Nov 16, 2016 5:17 pm
by dunbarx
Hi.
I did not open your stack, but try this:
Code: Select all
on mouseUp
answer file "xyz"
launch it
put the result
end mouseUp
This gives a valid pathname. I bet you did not. LC needs one to know what to launch and where to launch from.
About that "put the result" line. Add it after the launch line and see if it says something like "no such program". There might well be such a program, but it cannot be found.
Craig
Re: Launch another application with Launch command
Posted: Wed Nov 16, 2016 5:18 pm
by Klaus
Hi Paul,
if you want to start an APPLICATION ('.EXE on Win, '.APP on Mac) then "launch pathto_exe.exe" will do.
But you want to:
...
launch DOCUMENT "path/to_the/stack.livecode"
...
Best
Klaus
Re: Launch another application with Launch command
Posted: Wed Nov 16, 2016 5:34 pm
by mrcoollion
Strange enough my stack work now without any change
Does this also work in android?
I am working baby steps towards starting an application in android and communicate with it (via sockets)
Re: Launch another application with Launch command
Posted: Wed Nov 16, 2016 6:19 pm
by Klaus
mrcoollion wrote:Strange enough my stack work now without any change
Use "launch document ..." and it will always work reliably!
And don't use "file://" as in your example stack!
And for the sake of clarity in the terminology: stack <> application!
Re: Launch another application with Launch command
Posted: Wed Nov 16, 2016 11:58 pm
by mrcoollion
Thanks Klaus. And Stack <> application ... got it
