Calling a livecode executable -ui from LC server and get back a result.
mark at livecode.com
Fri May 5 13:22:06 EDT 2017
Just an update on my previous post. I did the following:
Took a community standalone engine from inside an installed LiveCode
distro on Windows and copied to the desktop.
Tried (from Command Prompt):
Noticed that I just got a newline in the console, and nothing else.
EDITBIN.EXE /SUBSYSTEM:CONSOLE Standalone.exe
Then repeated the same command (Standalone.exe -ui) and got:
ERROR: Initialization error - no stackfile to run
Where I would expect - in the console.
Then I created a simple livecodescript file:
write "foobar" to stderr
Standalone.exe -ui foobar.livecodescript
And got 'foobar' in the console I ran it from, and the console did
nothing more (as standalone engines don't quit unless you explicitly
close all stacks, or 'quit') until I did Ctrl-C. At which point control
returned to the console.
So - I think the EditBin suggestion will do as you want - and let you
create a standalone (built or unbuilt) which runs like a normal console
command so you should be able to get its output in shell() or from open
Hope this helps!
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the Use-livecode