Find text in a script
You can use the Find command to find and replace a word, statement, or any set of characters in an AppleScript script, regardless of how many times it occurs in the script.
You can search for text in the whole document or in a selected area of the document.
Choose Edit > Find > Find.
Enter the text to search for, then press the Return key to locate the string. You can refine your search by doing any of the following:
Click the forward arrow to move to the next string that matches the search.
Click Replace to replace the found text, then enter the replacement text.
To filter your searches, click the Search pop-up menu , then choose an option:
Ignore Case: Find text independent of whether letters are capitalized or lowercase.
Contains: Find text contained inside words. For example, if you type “most,” Script Editor also finds “almost.”
Starts With: Find letters at the beginning of words.
Full Word: Search only for the complete word you typed in the Find field.
Insert Pattern: Add special characters, wildcards, or patterns into your search.