Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Recognize normal text on the screen

Recognize normal text on the screen

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yytg
    wrote on last edited by
    #1

    My idea is so... The user put the cursor on a phone number from any program in the computer. He presses a Hot Key - and my program will dial the number. How do I recognize the text the cursor is on... If somebody can please bring a sample Thanks a lot

    F D N J 4 Replies Last reply
    0
    • Y yytg

      My idea is so... The user put the cursor on a phone number from any program in the computer. He presses a Hot Key - and my program will dial the number. How do I recognize the text the cursor is on... If somebody can please bring a sample Thanks a lot

      F Offline
      F Offline
      followait
      wrote on last edited by
      #2

      I think the tech used by dictionary softwares that pick words from screen may help.

      1 Reply Last reply
      0
      • Y yytg

        My idea is so... The user put the cursor on a phone number from any program in the computer. He presses a Hot Key - and my program will dial the number. How do I recognize the text the cursor is on... If somebody can please bring a sample Thanks a lot

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        See if IAccessible::get_accValue() is of any help.

        "Love people and use things, not love things and use people." - Unknown

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        Y 1 Reply Last reply
        0
        • Y yytg

          My idea is so... The user put the cursor on a phone number from any program in the computer. He presses a Hot Key - and my program will dial the number. How do I recognize the text the cursor is on... If somebody can please bring a sample Thanks a lot

          N Offline
          N Offline
          Nitheesh George
          wrote on last edited by
          #4

          Hi, I think u need to use Text Capture GDI hook to get selected text from any application. The Word Web dictionary is using technique. thanks Nitheesh

          1 Reply Last reply
          0
          • D David Crow

            See if IAccessible::get_accValue() is of any help.

            "Love people and use things, not love things and use people." - Unknown

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            Y Offline
            Y Offline
            yytg
            wrote on last edited by
            #5

            Thanks... http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx[^]

            Y 1 Reply Last reply
            0
            • Y yytg

              Thanks... http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx[^]

              Y Offline
              Y Offline
              yytg
              wrote on last edited by
              #6

              I did like this if (SUCCEEDED(AccessibleObjectFromPoint(pt, &pacc, &vtChild))) { BSTR bsName = NULL; BSTR bsValue = NULL; pacc->get_accName(vtChild, &bsName); pacc->get_accValue(vtChild, &bsValue); } The question is - How do I get the place of the marker in a text box Thanks a lot

              1 Reply Last reply
              0
              • Y yytg

                My idea is so... The user put the cursor on a phone number from any program in the computer. He presses a Hot Key - and my program will dial the number. How do I recognize the text the cursor is on... If somebody can please bring a sample Thanks a lot

                J Offline
                J Offline
                josip cagalj
                wrote on last edited by
                #7

                I've solved this problem months ago and I build an application doing exactly what you need! Now for starters, how did I solved users choice for dialing the number from screen. I've notated that user must select something (he can select the whole screen for what I'm concern) then I send commands to simulate CTRL+C action, this forces to copy all selected to an a clipboard. It is easy to get selected data from clipboard, then parse for telephone numbers. At the time I was furious and was google-ing all kind of forums for accessibility and other stuff. Getting sick only remembering! Now I'm hoping this helps you a bit, feel free to replay me! P.S. For me the key thing was introducing the 'select what you want to dial', I could not seem to find another way for achieving my gold at the time!

                Y 1 Reply Last reply
                0
                • J josip cagalj

                  I've solved this problem months ago and I build an application doing exactly what you need! Now for starters, how did I solved users choice for dialing the number from screen. I've notated that user must select something (he can select the whole screen for what I'm concern) then I send commands to simulate CTRL+C action, this forces to copy all selected to an a clipboard. It is easy to get selected data from clipboard, then parse for telephone numbers. At the time I was furious and was google-ing all kind of forums for accessibility and other stuff. Getting sick only remembering! Now I'm hoping this helps you a bit, feel free to replay me! P.S. For me the key thing was introducing the 'select what you want to dial', I could not seem to find another way for achieving my gold at the time!

                  Y Offline
                  Y Offline
                  yytg
                  wrote on last edited by
                  #8

                  It's a good idea... I want a perfect way... not a easy

                  J 1 Reply Last reply
                  0
                  • Y yytg

                    It's a good idea... I want a perfect way... not a easy

                    J Offline
                    J Offline
                    josip cagalj
                    wrote on last edited by
                    #9

                    Anyway glad if I could help. It would be great to see final result when you do it. If you have time please send me an e-mail with brief description of yours solution! Hope to hear from you. Bye

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups