CtrlText method not reading
I am using the CtrlText function to read a text in a textfield.
The procedure i followed is :
1.Find out the handle of the field using EditFind
2. Read the text using CtrlFind
Below are the statements that i wrote
hnd_sf = EditFind ("@~N~IEXPLORE.EXE~INPUT~PCode")
MessageBox( "Handle", hnd_sf, 'ok' )
sf_text = CtrlText( hnd_sf )
MessageBox( "Text", sf_text, 'ok' )
I am getting the correct handle but i am getting the text as blank through the above statements when the textfield has a value in it. Can someone help me read the value in the textfield. Appreciate ur help.
Re: CtrlText method not reading
It would be easier to just use the capture command on the edit field like this:
Attach "Untitled - Notepad MainWindow"
ret = Capture( "~P~NOTEPAD.EXE~Edit~Untitled - Notepad" )
msgbox "Edit Text", ret