473,385 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can GetWindowText read the text at X,Y points in another application?

3
All hi,

I would like to move the mouse to X,Y point to any other window application and read its contents providing there is data there. Can GetWindowText do it?
is there another function to do that?

While I am at this, if there is listbox or combo box, how will I be able to read its current data? can I move down the list?
is there an example around that I can look at?

Thanks,
siulm
Mar 22 '07 #1
4 2428
Frinavale
9,735 Expert Mod 8TB
All hi,

I would like to move the mouse to X,Y point to any other window application and read its contents providing there is data there. Can GetWindowText do it?
is there another function to do that?

While I am at this, if there is listbox or combo box, how will I be able to read its current data? can I move down the list?
is there an example around that I can look at?

Thanks,
siulm
Hello Siulm...welcome to the forum!

I don't think what you would like to do is possible. Once the mouse travels to another windows application "window" the "Application Focus" is changed away from your application to the other application.

This means that your application cannot process anything found in other windows...since the processing focus has been changed to the other application.

-Frinny
Mar 22 '07 #2
siulm
3
Frinny, Thanks you for your warm welcome. It is nice to see a good bunch of people helping eachother success. By the way, a FUN site and very informative.

Interesting...I did not think about changing focus. But my process is still running...couldn't I get the focus back again to my application?

I understand that GetWindowText can read the text in any control. SendMessage can help too. I have read a few of the posts and I understand how to get a window handle and how to retrieve the caption of the window. What I can't figure out is how to get the text or data out of the other controls, like the third item of a combo box or a text box or the information from a label.

Thanks for your replies.
Mar 23 '07 #3
Frinavale
9,735 Expert Mod 8TB
Frinny, Thanks you for your warm welcome. It is nice to see a good bunch of people helping eachother success. By the way, a FUN site and very informative.

Interesting...I did not think about changing focus. But my process is still running...couldn't I get the focus back again to my application?

I understand that GetWindowText can read the text in any control. SendMessage can help too. I have read a few of the posts and I understand how to get a window handle and how to retrieve the caption of the window. What I can't figure out is how to get the text or data out of the other controls, like the third item of a combo box or a text box or the information from a label.

Thanks for your replies.
Hi there!

I'm not very knowledgeable with the GetWindowText function.
But looking it up on MSDN I found that: "GetWindowText cannot retrieve the text of a control in another application."

As for retrieving data from another control...I don't think its possible unless its part of your application.

If you create the control yourself, you'll have to define some public properties to it that allows your application (or other controls) to access their data. Otherwise, the data is all sealed up.

Even the default controls, like Labels or Textboxes do the same thing. They have properties like txt_box.Text that will set or return the control's "text" value.


What exactly are you trying to do?

-Frinny
Mar 23 '07 #4
siulm
3
Thanks Frinny.

I was under the impression you could. Eventhough, GetWindowText may not allow you to get the data from controls from other Apps, SendMessage would.

I am trying just that, I would like be able to ready data from other Apps.

Thanks
Mar 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Randell D. | last post by:
Folks, I have seven text boxes which will contain measurements - I would like the user to input their values in the order that I have listed the boxes. How can I therefore make an input...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
1
by: Mauro | last post by:
Hi, as subject i've a problem with the API GetWindowText. I declare the function GetWindowText: public static extern int GetWindowTextt ( int hwnd, string lpString, int cch );
1
by: R Huff | last post by:
I am trying to capture some text of an external application by using the GetWindowText Win32 function. I am able to successfully retrieve the text of some windows in the application (text boxes,...
2
by: ashton | last post by:
Sorry for the confusing topic, I wasn't sure how to word this exactily. I have a program that needs to read a variable in from the outside. Specifically, the program will be run like this: Set...
2
by: Larry Dodd | last post by:
I am trying to write an application that sits in the system tray and just monitors for a certain Window to be opened. Once this window is opened all keystrokes will be captured. I have the key...
5
by: Sumana | last post by:
Hi All, We developed our project on VC++.Net console application to create image of disk and to write the image We are having problem with reading and writing the sector beyond 6GB Disk or...
1
by: Matrixinline | last post by:
Hi All, File Text.txt Contains following text as : "C:\program file\application data\details\app" "D:\Program File" I tried to read that data as fscanf(oFp, "%s %s", sCopyDirectory,...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.