input and output to a cli

Ken Ray kray at sonsothunder.com
Thu Feb 9 19:44:11 EST 2012


> I input commands and read the responses right from the command console. I
> want to be able to send commands to this interface from a livecode program
> on windows and I want the output to be displayed in a scrolling list field.
> How does one go about communicating with this kind of command line
> interface with livecode?

It depends.. if you just want to call a command line app and get its results immediately, you would use "shell", like:

  set the hideConsoleWindows to true
  put shell("node borg.js") into fld 1

If, on the other hand, you're trying to read the output of a continuously streaming command line (much like the "top" command on UNIX/OS X), then you'd probably need to do as Pete suggested and pipe the output to a file that can then be read periodically by LiveCode.


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list