# Script to press a button

**URL:** <https://forum.inductiveautomation.com/t/script-to-press-a-button/78347>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [August 24, 2023, 5:28pm UTC](https://forum.inductiveautomation.com/t/script-to-press-a-button/78347 "2023-08-24T17:28:41Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 24, 2023, 5:38pm UTC](https://forum.inductiveautomation.com/t/script-to-press-a-button/78347/8 "2023-08-24T17:38:30Z")

</div>

> [@Trigger a button Click with text entry](https://forum.inductiveautomation.com/t/trigger-a-button-click-with-text-entry/37507/10):
>
> 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 if event.propertyName == 'text': button = event.source.parent.getComponent('button 2') button.doClick()

---

_[View the full topic](https://forum.inductiveautomation.com/t/script-to-press-a-button/78347)._
