3 ms·
I finally started writing AppleScript a few months ago when I realized GPT-4 can write it for me, which eliminated almost all of my previous frustrations with i
by simonw 3y ago
I finally started writing AppleScript a few months ago when I realized GPT-4 can write it for me, which eliminated almost all of my previous frustrations with it: https://til.simonwillison.net/gpt3/chatgpt-applescript https://til.simonwillison.net/gpt3/chatgpt-applescript
- julianeon 3y agoI feel like scripting with non-standard languages (not Python, not JavaScript) is one of the killer features of GPT-4. It was trained on a large amount of this material and can spit out functional scripts for small tasks (which you can then chain together) incredibly quickly.
- fragmede 3y agoChatGPT is bad at the AutoHotKey (Windows automation scripting language), which is down to having two major largely incompatible versions of the language out, and a dearth of code examples out on the Internet.
- dreamcompiler 3y agoThis is sheer genius. The Javascript stuff was new to me too.
- jph00 3y agoChatGPT can even show you how to do this in Python BTW! from ScriptingBridge import SBApplication notes_app = SBApplication.applicationWithBundleIdentifier_("com.apple.Notes") for folder in notes_app.folders(): for note in folder.notes(): print(f"{note.name()}\n{note.body()}\n")
- gnicholas 3y agoThat's interesting, and would be doable for small scripts that I could fully understand. But I would be hesitant to use it for larger jobs, where it might end up misunderstanding me, and I wouldn't necessarily realize there was a mistake. Applescript is very powerful, and I wouldn't want to risk it deleting/moving/editing files. Perhaps in the future, when people have used it for this purpose for years (without incident), I would trust it more.
- fragmede 3y agoYes, you'd want to read the code before running it.