Re: How to do screenshot in Linux?
- Posted by ghaberek (admin) May 07, 2013
- 1465 views
SocIoDim said...
Do I understand correctly that I have to use temporary files? I was hoping that the Euphoria allows me to work in the style of piping. Something similar to this:
sequence MySystemIs = stdout_of(system_exec("uname")) -- MySystemIs = "Linux"
Euphoria does indeed have Pipe Input/Output. You just have to use pipeio:exec() instead of system_exec().
include std/pipeio.e function stdout_of( sequence command ) sequence data = {} object p = pipeio:exec( command, pipeio:create() ) object buff = pipeio:read( p[STDOUT], 256 ) while sequence(buff) and length(buff) do data &= buff buff = pipeio:read( p[STDOUT], 256 ) end while return data end function sequence MySystemIs = stdout_of( "uname" )
-Greg