On the contrary, open process can be used in a non-blocking way - although you
do need to poll using read until empty (which returns all available data at
that point).
(The read from process command could do with a callback form really - like read
from socket has).
I've done this before - you
Thanks Mark. I'm going to give "open process for update" a spin. Is this
something that you would consider robust enough to be used in a long
running server type context?
So we can have a Livecode server communicating with these processes and
serving out processed results over sockets to a web ser
The shell function inherits its environment from LC so there's no issue here.
You can also use open process for update, write to it then read from it.
The elevated version of open process prompts for authentication and then runs
the process as administrator. It uses system support for UI based p
Well I found one - though I'm not sure it is strictly legal:
put " put shell ("echo $LIVECODEVAR | shellThing -q")
>
which is great. I don't "think" this pollutes the environment, as AFAIK
shell() is in it's own space (like opening a tab in the terminal) - but are
there any issues?
I'd like
Ah. The beauty of Livecode's OS X/Unix "return" substitutions. OS X
is unix. Kind of. Until you shell out from Livecode.
On Mon, Jan 9, 2012 at 5:42 PM, Pete wrote:
> OK, I got this working. In order to get the correct linefeed characters
> for Unix,
___
OK, I got this working. In order to get the correct linefeed characters
for Unix, I had to open the output file in binary mode. Once I did that,
everything worked fine.
Pete
On Sun, Jan 8, 2012 at 11:00 PM, Pete wrote:
> The command is in a variable, eg put shell(myCommand) into myResult. I'm
The command is in a variable, eg put shell(myCommand) into myResult. I'm
thinking it's something other than that though since even if I type the
command directly into Terminal with the stdin redirection, no output is
produced.
sqlite3 has a .echo command which prints all the commands to stdin. I
Pete-
Sunday, January 8, 2012, 6:54:44 PM, you wrote:
> Those commands all work fine when typed into the program by me but nothing
> is written to the output file if I redirect stdin to a file that contains
> them.
Ah. In that case, are you putting quotes around the shell command?
Works here for
Mi Michael,
This is running on my desktop (OS X)
Pete
On Sun, Jan 8, 2012 at 6:24 PM, Michael Kann wrote:
> Pete,
>
> Is your set-up on the on-rev servers?
>
> Mike
>
> --- On Sun, 1/8/12, Pete wrote:
>
> From: Pete
> Subject: Shell question
> To: "How to use LiveCode"
> Date: Sunday, Januar
Hi Mark,
The program in question is sqlite3. I'm trying to give it commands to
export an sqlite table in the form of INSERT commands. The program is run
by typeing:
sqlite3
after it has started I need to feed it the following commands:
.mode sql
.output
SELECT whatever;
.exit
Those command
Pete,
Is your set-up on the on-rev servers?
Mike
--- On Sun, 1/8/12, Pete wrote:
From: Pete
Subject: Shell question
To: "How to use LiveCode"
Date: Sunday, January 8, 2012, 7:52 PM
I suspect this is more of a Unix question than LC but here goes.
I'm issuing a shell command to run a progra
Pete-
I've read through this a couple of times now trying to parse what
you're trying to do. Here's my guess: you'd like to set up a text file
of responses to prompts from the myProg program, which would be
processed at the time myProg wants more input. If so, you should check
out the "expect" com
12 matches
Mail list logo