Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created December 23, 2022 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/cc3ddbfa05ef274186d513b84753c16e to your computer and use it in GitHub Desktop.
Save bjoerntx/cc3ddbfa05ef274186d513b84753c16e to your computer and use it in GitHub Desktop.
TXTextControl.subTextParts.forEach(stp => {
stp.getName(stpName => {
if (stpName.startsWith("My")) {
stp.getStart(start => {
stp.getLength(length => {
TXTextControl.select(start - 1, length, () => {
TXTextControl.selection.setText("New Text")
});
})
})
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment