Jump to content

ControlGetText function returns the hidden text of a control


Recommended Posts

Hi,

 
    I am trying to get the text from the control using the ControlGetText function, but I am facing an issue which returns me the hidden text rather than the current text.
Also set the option Opt("WinDetectHiddenText", 0) but no luck.
 
Any help on this would be of great help.
 
From the screenshots... I am expecting hhhhh@yahoo.com but I am getting kkkk@gmail.com.
 
 
 
Thanks 
 
Kishan Kumar

post-81134-0-75103000-1374674173_thumb.p

post-81134-0-00217800-1374674175_thumb.p

Edited by koolsip
Link to comment
Share on other sites

You could try 'WinGetTitle' using only the control handle, like 'WinGetTitle($hControl)'.. if that returns the same, then its most likely not 'hidden' as far as the program is concerned when responding to WM_GETTTEXT messages.  You might have to filter that out manually

Link to comment
Share on other sites

You could try 'WinGetTitle' using only the control handle, like 'WinGetTitle($hControl)'.. if that returns the same, then its most likely not 'hidden' as far as the program is concerned when responding to WM_GETTTEXT messages.  You might have to filter that out manually

 

I assume WinGetTitle will return me the title of the window...I just need the text from the control which in this case is a Static Text.

Link to comment
Share on other sites

Assuming gets you nowhere.  A control handle acts the same as a window handle when passed to WinGetTitle

Link to comment
Share on other sites

Ascend4nt

I tried with WinGettiltle but its returning me the same results. From the Window Info we can see that the Text is hidden, but still why its getting the hidden text.

Any alternatives to this would be of great help.

Kishan 

Link to comment
Share on other sites

The reason I wanted you to check with WinGetTitle is to verify that that's whats returned using a regular WM_GETTEXT call. Basically, the text is hidden to the 'user', but any program can easily read that control.  Its up to you to either not include that control when reading controls, or to choose a different way of representing the data in the control

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...