[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how recognize output of dialog ncurses inside shell
- From: Michal Kolodziejczyk <miko@...>
- Date: Wed, 18 May 2011 12:40:25 +0200
On 18.05.2011 12:02, Vasiliy G Tolstov wrote:
> Hello. I'm not try google, sorry.
> How can i get some info about installing specific application what uses
> dialog ncurses windows with progress bars and messages?
> For example some program does not allow to run noninteractive and some
> times brings boxes with yes/no questions, how can i parse it output with
> lua?
> Does it possible ?
>
In theory you can search for ansi control codes in application's output
(if you can get one, for example with io.popen()) - if you find some,
then the application uses ncurses most probably.
So as far as lua is concerned, io.open() and string functions is enough
for detecting ncurses output. But parsing output of such applications
can be tricky, no matter what language you use.
http://en.wikipedia.org/wiki/ANSI_escape_code
Regards,
miko