# Trigger a button Click with text entry

**URL:** <https://forum.inductiveautomation.com/t/trigger-a-button-click-with-text-entry/37507>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [August 7, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/trigger-a-button-click-with-text-entry/37507 "2020-08-07T15:31:57Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 7, 2020, 7:14pm UTC](https://forum.inductiveautomation.com/t/trigger-a-button-click-with-text-entry/37507/10 "2020-08-07T19:14:16Z")

</div>

Try this, Jython is a structured language so white space matters. Where many languages have brackets to determine scope, Python/Jython uses white space for this. Use two spaces for indention or a tab

```auto
if event.propertyName == 'text':
  button = event.source.parent.getComponent('button 2')
  button.doClick()

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/trigger-a-button-click-with-text-entry/37507)._
