Last active
November 15, 2022 01:31
-
-
Save SKaplanOfficial/d18b8300a6c14d7f15ab491a947564e8 to your computer and use it in GitHub Desktop.
Using PyXA to list all paragraphs, words, and characters in all currently open TextEdit documents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test with PyXA 0.1.0 | |
import PyXA | |
app = PyXA.Application("TextEdit") | |
documents = app.documents() | |
print("Paragraphs:", documents.paragraphs()) | |
print("Words:", documents.words()) | |
print("Characters:", documents.characters()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment