# Disable Scripting Auto-Complete

**URL:** <https://forum.inductiveautomation.com/t/disable-scripting-auto-complete/98898>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [November 20, 2024, 9:49pm UTC](https://forum.inductiveautomation.com/t/disable-scripting-auto-complete/98898 "2024-11-20T21:49:38Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 21, 2024, 9:19pm UTC](https://forum.inductiveautomation.com/t/disable-scripting-auto-complete/98898/11 "2024-11-21T21:19:17Z")

</div>

~~[quote="PGriffith, post:8, topic:98898"]~~

~~ 

```python
for window in Window.getWindows():
	ptas = getAllComponentsOfClass(window, 'PythonTextArea')
	for pta in ptas:
		pta.textArea.insertPairedCharacters

```

 ~~

[/quote]

~~I actually did this per your instruction originally, and I couldn't find the attribute. The `pta.textarea` call doesn't retrieve a pure RSyntaxTextArea. It gets a PythonTextArea$textArea$1'. However, even when I approached it reflectively to get at the raw class, `.gerClass().getSuperclass().getSuperclass()`, in this case, I didn't see that attribute on the RSyntaxTextArea.~~

**Update:** After updating my test gateway to 8.1.44, I noticed an extra `'` get added whenever I would create a comment block using `'''`. I hadn't seen that behavior before, and I remembered this post. Running the test again, the attribute is there, so the fact that I couldn't find it was because I wasn't using the latest version.

Here is an updated version of the script based on the feedback above:

```python
from java.awt import Window
def getAllComponentsOfClass(container, className):
	for component in container.components:
		if component. __class__. __name__ == className:
			yield component
		else:
			for c in getAllComponentsOfClass(component, className):
				yield c

for window in Window.getWindows():
	if window.visible:
		scriptEditors = getAllComponentsOfClass(window, 'PythonTextArea$textArea$1')
# Use this for Perspective's advanced style sheet:
# scriptEditors = getAllComponentsOfClass(window, 'RSyntaxTextArea') 
		for editor in scriptEditors:
			editor.insertPairedCharacters = False

```

I've tested it and it works

One interesting observation I made while subsequently testing was in the Perspective style sheet—which is the only pure RSyntaxTextArea I'm aware of in Ignition. It does auto complete the `'` on the first press, but it deletes the auto completion if the apostrophe is pressed a second time, and the quadruple apostrophe doesn't occur, so perhaps the key to fixing the `PythonTextArea$textArea$1` nuisance duplications is in the style sheet's implementation.

---

_[View the full topic](https://forum.inductiveautomation.com/t/disable-scripting-auto-complete/98898)._
