# Object reference error

**URL:** <https://www.finalbuilder.com/forums/t/object-reference-error/4594>\
**Category:** Discussion\
**Created:** [February 25, 2015, 3:38am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594 "2015-02-25T03:38:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [February 25, 2015, 3:38am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594/1 "2015-02-25T03:38:46Z")

</div>

I&nbsp;want check a Delphi XE5 application. On a form are some TsEdit controls. But i can't send a text to this. Why?

The Log:  
Finding process SAS, No. 1  
Evaluating description to find control...  
Retrieved control : Window Handle 12780248, Window Class Edit, ""&nbsp;&nbsp; \<------- it shoud be possible to send text  
Sending text to control:  
test  
An error occured :   
Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.&nbsp; \<------- Error! Why ???

Thanks  
René

---

<div class="post-metadata">

**Author:** ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)\
**Post date:** [February 25, 2015, 11:20am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594/2 "2015-02-25T11:20:32Z")

</div>

Hi Rene,   
  
 Typically this message would occur if the control in question does not have a Windows Handle (or exposes a WinControl property). Its this property which is required to call the SendText or SendKeys command on.

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [February 27, 2015, 10:24am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594/3 "2015-02-27T10:24:18Z")

</div>

I do not understand that. The control was recognized and received a handle (Window Handle 12780248).   
  
 In other forms, it works fine. For example:   
  
 Finding process SAS, No. 1   
 Evaluating description to find control…   
 Retrieved control : Window Handle 4587968, Window Class Edit, “”   
 Sending text to control:   
 22848   
 Done.

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [February 27, 2015, 10:01am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594/4 "2015-02-27T10:01:18Z")

</div>

What type of application is it, VCL or FMX? What as a TsEdit control (not a standard control)? Not all controls support sendkeys. The gui automation feature in Automise is very basic, it does not work with all applications/control types (generally only those with a window handle).

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [March 2, 2015, 10:51am UTC](https://www.finalbuilder.com/forums/t/object-reference-error/4594/5 "2015-03-02T10:51:05Z")

</div>

This is an VCL Application. In all cases it is a TsEdit Control. It’s am member from TEdit (TsEdit = class(TEdit)).   
 In one form it works fine an in another form i’ m getting an error while a handle is available.   
  
 A solution to the problem I’ve found. First, I create a mouse click on the control and can then enter the text there.
