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

Malte Brill revolution at derbrill.de
Thu May 4 20:34:06 CEST 2017


Hi all,

has anybody successfully done this? Especially on Windows? I would like to launch a livecode built application from a liveCode server script and get the output back (on a Server that I control) Is that possible? If so, how?

I tried a couple of things to no avail:

<?lc
  set the shellCommand to "CMD"
  put "<html>"
  put the time
  put "<br />"
  put Quote & "thes.exe" & Quote &&"-ui" into tShell
  try
    get shell(tShell)
    put "Result:" && the result & cr &"It:" && it
    put "<br />"
    open process tShell for binary read
   read from process tShell until EOF
   put "Result:" && the result & cr &"It:" && it
   put "<br />"
  catch theErr
  put theErr
end try
put cr
put the time
put "</html>"
?>

the helper app: In the stack script:

on startup
  send "boo" to me in 500 millisecs
  — to make sure all libs are loaded
end startup

on boo
  quit
end boo

on shutdown
  write "boo" to stdout
end shutdown

Thanks for all input I can get…

Malte




More information about the use-livecode mailing list