Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to get back datas displayed on the screen ?


    Hi everyone,

    I'ld like to get back character strings that are diplayed on the screen (for instance the letters of this post you see on your screen ), in order to use them in a programm i'm making.

    I guess there is a special buffer in the memory for stuffs displayed on the screen.. but how to access and manipulate the datas that are in it ?

    Thanks

    Addon


  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,003
    It depends upon whether you are using a GUI or a CLI interface. For a GUI, you highlight the text, and then go to the edit tab and click on copy. Then use the paste option to copy it into another application. If you are using the CLI (command line interface), you just highlight (drag the cursor over the text) and use the middle mouse button to copy it to another application, such as VI/VIM, etc. If you are using a CLI without a mouse, then there are control keys to do that. See the bash man page for details.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Thanks Rubberman, but i think i did not made my self enough clear...

    Indeed what i want is to make a program abble to go across the text displayed on the screen and when the programm recognize a suite of letters, it must be abble to do a proper action. (for instance if it sees the word "name" it will open a website page...)

    p.s: don't worry i know how to copy and paste

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,003
    Ok. Automated text scanning vs manual. Thanks for the clarification. I'm sure you can programmatically access the data in a screen/window/shell buffer, but I haven't needed to do that so I can't really tell you how to accomplish that. I was just scanning the bash man page, and it has a number of means to access the bash buffer which you could possibly use.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    Quote Originally Posted by ADDON View Post
    Hi everyone,

    I'ld like to get back character strings that are diplayed on the screen (for instance the letters of this post you see on your screen ), in order to use them in a programm i'm making.

    I guess there is a special buffer in the memory for stuffs displayed on the screen.. but how to access and manipulate the datas that are in it ?

    Thanks

    Addon

    There isn't a single buffer that holds the text. It would be a giant security hole to have such a thing, and probably not very practical since the text comes from many possible sources. If you narrow your criteria you may have some success. For instance, browsers allow extensions and there are extensions that modify the displayed text when installed.

  7. #6
    The text i want to extract is in a window writen in Flash (for instance: an online poker table)...

  8. #7
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    Last time I checked the Flash stream was proprietary.

  9. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,003
    Quote Originally Posted by gregm View Post
    Last time I checked the Flash stream was proprietary.
    True, but it has been reverse-engineered a number of times. Even Google is now going to translate Flash streams to HTML5.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #9
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    Quote Originally Posted by Rubberman View Post
    True, but it has been reverse-engineered a number of times. Even Google is now going to translate Flash streams to HTML5.
    Somewhere I read that Adobe is converting Flash itself to HTML5 so I guess the answer could be ... wait awhile and it will be easy!

    In the meantime I guess he could run this tool to see the ports possibly being used and snoop the stream.

  11. #10
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,453
    Hi.

    I have used readability to extract text (or perhaps ignore graphics) on web pages so that I can obtain the text: https://www.readability.com/

    Can it be automated? I don't know.

    Can it deal with Flash? I don't know.

    Try it and let us know. Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •