# Text input script

**URL:** <https://forum.inductiveautomation.com/t/text-input-script/3798>\
**Category:** Ignition\
**Created:** [December 22, 2011, 5:41pm UTC](https://forum.inductiveautomation.com/t/text-input-script/3798 "2011-12-22T17:41:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jac](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jac](https://forum.inductiveautomation.com/u/jac)\
**Post date:** [December 22, 2011, 5:41pm UTC](https://forum.inductiveautomation.com/t/text-input-script/3798/1 "2011-12-22T17:41:37Z")

</div>

I’m having a tough time combining these two scripts. What I want is to limit who can edit a string input (using the touch screen keyboard) in the PLC based on their user role. These scripts work separately but having a problem getting them together. Is there an easier way?

`roles = system.security.getRoles()
if 'Administrator' in roles or 'Operator' in roles:
	value = 1
	event.source.parent.enabled = value
else:
	event.source.enabled = 0`

* * *

`system.gui.setTouchscreenModeEnabled(1)
if system.gui.isTouchscreenModeEnabled():
   event.source.text = system.gui.showTouchscreenKeyboard(event.source.text)
system.gui.setTouchscreenModeEnabled(0)`

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 22, 2011, 5:55pm UTC](https://forum.inductiveautomation.com/t/text-input-script/3798/2 "2011-12-22T17:55:21Z")

</div>

Where do you have the scripts right now? Which event handler?
