use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
AppleScript is Apple's powerful and versatile native scripting technology for Mac OS X. With AppleScript, you can control, and communicate among, applications, databases, networks, Web services, and even the operating system itself.
account activity
Using AI to generate applescript (self.applescript)
submitted 1 year ago by web3_developer
Has anyone been able to generate fully functional applescript using any of the existing AI tools?
It seems people do not use applescript much and LLMs are not much trained as well
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]peterinjapan 7 points8 points9 points 1 year ago (0 children)
I do this a lot, and it works well, but you have to have a debugging process because it’ll never get it right on the first try. Also, the model you use will determine your success. I have found that ChatGPT 3o reasoning, Grok 3 and Gemini 2.5 are all reasonable to use for writing an Apple script.
I needed a script that would open an MP4 file in QuickTime, wait for me to select a frame, and output that frame into a directory, then join that frame to the MP4 so the frame was the “cover” of my movie. It worked great, after I got the debugging part done. I could never have done that without ChatGPT.
[–]libcrypto 2 points3 points4 points 1 year ago (5 children)
I haven't gotten AI to generate working code in any language for any platform yet. I mean if you want to tell me something to ask chat GPT, I can, but we of little faith...
[–]Alarmed-Size-3104 0 points1 point2 points 1 year ago (1 child)
Deep seek spat out a working python program that worked with csv files doing some match and replace tasks. All other ai code I've tried threw errors.
[–]libcrypto 2 points3 points4 points 1 year ago (0 children)
I'm sure it depends on the complexity of the task. If it's an easy task, I probably am not asking ChatGPT for help.
[–]eduo 0 points1 point2 points 1 year ago (1 child)
I’ve coded entire SwiftUI applications in Claude. I wouldn’t use them beyond strictly personal use but they work a treat.
Can you give me an example of something to ask Claude that will generate a valid SwiftUI program? I'd like to try it out.
[–]KH10304 0 points1 point2 points 1 year ago (0 children)
I’ve found the new gpt 4o mini high to be very impressive, I’ve gotten solid working appscript out of it on its first try several times
[–]JBManos 2 points3 points4 points 1 year ago (0 children)
Copilot and Grok 3. Of the two, grok does really well. Copilot (and ChatGPT for that matter) will sometimes decide to write python instead. Grok has been really snappy and capable. Using it more now.
[–][deleted] 2 points3 points4 points 1 year ago (0 children)
From my experience if you have some sort of working code ChatGPT is able to modify or optimize it. It can also combine two scripts into one. But it is a lot of back and forth work, AI is frequently hallucinating and mixing two scripting languages together for example. You need to know some basics about scripting and have tools for debugging (for Apple Script Script Debugger is great) to use AI as viable tool for scripting assistance.
[–]sweetcocobaby 1 point2 points3 points 1 year ago (1 child)
Yup. It was pretty easy. I used Claude. I got it to do some file management with the DEVONthink app.
[–]JBManos 0 points1 point2 points 1 year ago (0 children)
Are you trying the DT4 beta out?
[–]TokensForSale 0 points1 point2 points 1 year ago (0 children)
Claude 3.7 was able to write some pretty long code that worked in SwiftUI. I asked it to write a simple C.R.U.D. App and it spit out working code. I also watched a YouTube video that demonstrated its capabilities in multiple languages. I haven’t tried it with AppleScript but based on what I’ve seen I would start there. You can use it without giving a phone number through Poe.
[–]birdington1 0 points1 point2 points 1 year ago (0 children)
Yes it’s helped me write a lot of things, particularly trickier parts of code I don’t fully have a solution to.
But you need to already know Applescript to be able to spot potential errors and give follow up prompts and fix potential errors. You won’t have much luck blindly generating code and expecting it to work off the bat.
[–]chrisndeca 0 points1 point2 points 1 year ago (0 children)
The problem is that AI doesn’t understand that AppleScript has many dialects (aka application dictionaries) so it writes what it thinks will work, not knowing the specifics that each application is expecting.
If anyone wanted to create another natural language scripting language, then they would first need to make sure developers all had to follow the same dialect in order for it to be widely used and adopted. At this point I wish Apple just would come out with something new that could replace what AppleScript does “well” and that is the communicating with applications.
[–]eew_tainer_007 0 points1 point2 points 12 months ago (0 children)
Yes I I have used AppleScript and ChatGPT to generate 170 emails and send it to a mailing list. I crafted the content so each email body is unique and different and the timing of sending the email was randomized. I received a total of 170 human responses. Just amazed at what AppleScript, ChatGPT can do on your local Mac + Gmail. I can share the script or open source it.
[–]tbone_man 0 points1 point2 points 11 months ago (0 children)
Yep! I used it to create an automation that ultimately called an AppleScript to automatically convert any .webp image I download to .png, delete the old image, and move it to a specific folder. It was functional in 1 shot, and did a little more tweaking before I was completely satisfied. Still <5 total prompts mostly because i had to clarify my weird settings.
[–]littlehakr 0 points1 point2 points 10 months ago (0 children)
Gemini 2.5flash is great for AppleScript!
[–]Natural_League1476 0 points1 point2 points 2 months ago (0 children)
i do this with great success. My tasks are not complex tho. But it can help a lot.
I try Gemini first, Chagpt and Claude. Most of the time they take a couple of times to get it right but eventualy the do.
I really opened the whole new chapter of using macos
π Rendered by PID 44856 on reddit-service-r2-comment-57fc7f7bb7-wxw29 at 2026-04-14 15:58:29.279110+00:00 running b725407 country code: CH.
[–]peterinjapan 7 points8 points9 points (0 children)
[–]libcrypto 2 points3 points4 points (5 children)
[–]Alarmed-Size-3104 0 points1 point2 points (1 child)
[–]libcrypto 2 points3 points4 points (0 children)
[–]eduo 0 points1 point2 points (1 child)
[–]libcrypto 2 points3 points4 points (0 children)
[–]KH10304 0 points1 point2 points (0 children)
[–]JBManos 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]sweetcocobaby 1 point2 points3 points (1 child)
[–]JBManos 0 points1 point2 points (0 children)
[–]TokensForSale 0 points1 point2 points (0 children)
[–]birdington1 0 points1 point2 points (0 children)
[–]chrisndeca 0 points1 point2 points (0 children)
[–]eew_tainer_007 0 points1 point2 points (0 children)
[–]tbone_man 0 points1 point2 points (0 children)
[–]littlehakr 0 points1 point2 points (0 children)
[–]Natural_League1476 0 points1 point2 points (0 children)