veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

208
active users

#AppleScript

1 post1 participant0 posts today

I always get a bit cagey when people ask if #HyperTalk is like #AppleScript.

There's an inspiration there, but AppleScript jettisons one of the fundamental strengths of HyperTalk: that it's designed to account for human “flaws" and logic gaps and removes the need to think about certain advanced programming concepts, whereas AppleScript actually has that logical structure under the hood and just makes it implicit … until it isn’t and you get an error message and need to deal with it.

1/6

The first and only piece of #AppleScript I have written. Very useful: Copy the geographic location metadata of one image in the #macOS #PhotosApp to a selection of other images that lack location information.

Script is available split into two pieces, as alt text in the images.

(Yes, I know Photos has Image>Location>Copy Location and Image>Location>Assign Location. I often find running this script more handy, though.)

Every week I sit down to budget, and it starts by opening Safari with two windows I set up.

It finally clicked that I should automate this, so, here it is! A combination of AppleScript + Shortcuts and it's now one click in my Dock.

I show the AppleScript on the left so you can see it all. It checks for Safari running because launching Safari gets you a window automatically. Second picture is the result. (Two YNAB tabs because I have $ and € budgets.)

Replied in thread

@ia Wow! I didn't realize this was already working. Nice! This let me build a nice automation (#LaunchBar action) to correct text with ChatGPT. Any chance you'll add support for this to the #AppleScript library on Mac or #Shortcuts? Currently, I need to use UI scripting. It's working but it's hard to share because of the custom naming of sources. Something like this would be ideal:

Continued thread

The way it works is this:

1. A print is initiated from a device to the CUPS-PDF driver on my #netatalk Raspberry Pi.
2. The resulting PDF is placed in the AFP share of netatalk/afpd.
3. An emulated PPC Mac 9.2.2 running the #AppleScript below is watching for new files in that folder and will print them using Acrobat Reader to the #ImageWriterII via #LocalTalk using the MacPalette II driver.

It works, but crashes with dialog that I can't auto-dismiss.

Continued thread

So I have a new MacOS 9.2.2 #AppleScript Folder Action attached to a network share via netatalk. It works only if these conditions are met:

1. The folder is open already in the Finder. If it’s closed, it never triggers.
2. The new item is added to the folder from the current machine. Items added remotely to the network share do not “refresh” therefore never trigger the action.

Is this expected?