![]() ![]() With title "Search Open TextEdit Documents") Make new document with properties default button 2 ¬ SearchString & linefeed & linefeed & documentNamesList Set docText to "The following TextEdit documents contain the search string: " & ¬ Set AppleScript's text item delimiters to "" ![]() Set documentNamesList to documentNamesList as string Set AppleScript's text item delimiters to linefeed If text of document i contains the searchString thenĬopy name of document i to end of documentNamesList if running of application "TextEdit" then If no match is found, it displays a dialog box with a message. If a match is found, it then creates a new TextEdit document with the name(s) of the document(s) containing the search string. The following example AppleScript code when run from Script Editor, or saved as an AppleScript application, will present a search string dialog box for you to type in the search string.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |