this post was submitted on 09 Jan 2025
30 points (89.5% liked)
Apple
17794 readers
33 users here now
Welcome
to the largest Apple community on Lemmy. This is the place where we talk about everything Apple, from iOS to the exciting upcoming Apple Vision Pro. Feel free to join the discussion!
Rules:
- No NSFW Content
- No Hate Speech or Personal Attacks
- No Ads / Spamming
Self promotion is only allowed in the pinned monthly thread
Communities of Interest:
Apple Hardware
Apple TV
Apple Watch
iPad
iPhone
Mac
Vintage Apple
Apple Software
iOS
iPadOS
macOS
tvOS
watchOS
Shortcuts
Xcode
Community banner courtesy of u/Antsomnia.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yeah, I have some Python scripts that reflow selected passages of code for me using this approach. It always feels so weird when I'm using some OS that seemingly doesn't support any sort of GUI scripting.
It's worth noting that while you can simulate mouse clicks and key strokes within any app, some support a few direct scripting commands. For example, in Terminal, you don't need a GUI script to open a new window and type in it to run some command. You can just issue an AppleScript command to
tell app "Terminal" to do script "top"
or whatever. That's because Terminal's scripting library includes ado script
command.For more on this, you can fire up Script Editor and go Open Dictionary. You will see a list of all apps with any sort of scripting support and be able to get documentation on what you can do with it.