Calling a livecode executable -ui from LC server and get back a result.

Richard Gaskin ambassador at fourthworld.com
Fri May 5 13:27:01 EDT 2017


Ah!  Now the light comes on. This example, with the background provided 
in your previous post, make it all come together.

Thanks!

-- 
  Richard Gaskin
  Fourth World Systems


Mark Waddingham wrote:

 > 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):
 >
 >    Standalone.exe -ui
 >
 > Noticed that I just got a newline in the console, and nothing else.
 >
 > Did:
 >
 >    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:
 >
 >    script "foobar"
 >    on startup
 >      write "foobar" to stderr
 >    end startup
 >
 > Then did:
 >
 >    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 process.
 >
 > Hope this helps!





More information about the use-livecode mailing list