How to run Apple script, or Quick application

I want to batch copy the title in my MacOS Photos pictures to the caption/desctiption of the photo for use in iOS. I found an Apple Script in the community (specifically: Script: Batch Change the Description to t… - Apple Community )

I've never run a script before, and I tried to follow the instructions, I don't know how one "runs" a script. Is there a set of steps I can be referred to for this purpose, please.


MacBook Air 11″, macOS 11.7

Posted on Apr 30, 2023 10:07 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 30, 2023 10:38 AM

To locate the Script Editor, click once on the Desktop to wake Finder up and then press shift+cmd+U to open the /Applications/Utilities folder. Double-click Script Editor to launch it.


You launch Apple's Script Editor and then copy/paste Leonie's AppleScript source at that link into the Script Edittor. Click the hammer icon (compile) and then click the Run button. If that script does what you want, then you can save the script source via Save… > File Format : text, Save as: photos_description.applescript, choose the location where you want to save the script, and Save.


Next, if you want a script that you can double-click in the Finder to run without opening Script Editor, you can press option+key Save As… > File format: (your choice of script, script bundle, application) — these also change the extension in the Save As field, Save As: photos_description, Desktop, and Save.



6 replies
Question marked as Top-ranking reply

Apr 30, 2023 10:38 AM in response to gj2011

To locate the Script Editor, click once on the Desktop to wake Finder up and then press shift+cmd+U to open the /Applications/Utilities folder. Double-click Script Editor to launch it.


You launch Apple's Script Editor and then copy/paste Leonie's AppleScript source at that link into the Script Edittor. Click the hammer icon (compile) and then click the Run button. If that script does what you want, then you can save the script source via Save… > File Format : text, Save as: photos_description.applescript, choose the location where you want to save the script, and Save.


Next, if you want a script that you can double-click in the Finder to run without opening Script Editor, you can press option+key Save As… > File format: (your choice of script, script bundle, application) — these also change the extension in the Save As field, Save As: photos_description, Desktop, and Save.



May 1, 2023 7:01 AM in response to VikingOSX

Thank you, VikingOSX! This worked just like I was hoping. I appreciate your quick response.


Just a note, when I double-clicked the Script Editor, I got this:


To launch it, I I clicked on "New" from the file menu, and then proceeded with the rest of your instructions. I am using Big Sur due to age of my Mac.


Thanks again,


May 1, 2023 7:55 AM in response to gj2011

Note that your screenshot indicates that by default, the Script Editor will be saving things to the iCloud Drive Script Editor folder instead of to your local drive. That may be fine as long as you remember that, but if you want to save to your local drive, then 1) change the location in your screenshot, or 2) disable the iCloud Script Editor location by System Preferences > Apple ID > iCloud Drive > Options… ☐ Script Editor.


AppleScript is a programming language primarily designed to work with individual applications that include an application-specific scripting dictionary and reserved commands that work with these applications. You can see a list of applications with these scripting dictionaries from the Script Editor's File menu > Open Dictionary…


AppleScript has nothing in common with BASIC, or even higher-level programming languages that use more modern data structures. It was available as far back as Mac Classic and has not changed considerably since.


There is an online AppleScript Language Guide that is indispensable for learning AppleScript syntax from within the Script Editor. Apple provides an online Script Editor User Guide for Ventura that has changed little since its version for Big Sur. You may want to visit the rebooted :macScripter.net site for examples of AppleScript code that solve problems. And there are other AppleScript references here. Note that most of the good AppleScript books are quite old now, but for the most part, still relevant, with some terminology changes.


Apple's future direction and commitment to AppleScript may eventually change and those who were its biggest champions have left Apple.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to run Apple script, or Quick application

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.