#applescript

Added a new blog post about updating an #AppleNote using #Alfred to tack entries into a Playlist note.

Had to use some #AppleScript . But it does what I set out to do:

thoseoptimizeguys.com/using-al

Late Night Software Ltd.latenightsw@mstdn.ca
2025-05-16
Pasquale 📷 🇫🇷 🦻pasqualeberesti@piaille.fr
2025-05-16

#Apple Musique (aka #iTunes), c'est quand même une bien belle merde, je ne sais pas pourquoi je continue à l'utiliser. Ha si, parce qu'elle supporte #Applescript, et que je peux donc mettre à jour ma liste d'écoutes en temps réel. Mais sinon... Pouah !

Late Night Software Ltd.latenightsw@mstdn.ca
2025-05-15
Late Night Software Ltd.latenightsw@mstdn.ca
2025-05-09
Late Night Software Ltd.latenightsw@mstdn.ca
2025-05-07
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-30
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-29
Uli Kusterer (Not a kitteh)uliwitness@chaos.social
2025-04-26

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

Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-26
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-24
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-23
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-22
Late Night Software Ltd.latenightsw@mstdn.ca
2025-04-19
2025-04-16

This feature was actually requested by a video producer who creates insane amounts of video and audio, and needs as much automation as possible.

So. I have added some more!

The integrated Audio Converter in #NeoFinder 8.9 for #macOS can now be invoked using the powerful #AppleScript automation tools!

neofinder.de/forum/phpBB3/view

#MediaAssetManager
#MusicProduction
#IndieDev

NeoFinder for macOS and iOSneofinder
2025-04-16

The integrated Audio Converter in 8.9 for can now be invoked using the powerful automation tools!

You can even set up the conversion parameters per script, as you need them.

That makes it a lot easier to integrate the converter into complex workflows of any kind.

neofinder.de/forum/phpBB3/view

2025-04-01

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.)

-- Inspect the images selected in macOS Photos, and if one and only one of them has a geographical location, copy that to the other images in the selection, too.
tell application "Photos"
	activate
	set imageSel to (get selection)
	if (imageSel is {}) or (the length of imageSel < 2) then
		error "Please select at least two images."
	else
		set lat to 0
		set lon to 0
		set haveLoc to false
		set withLat to false
		set withLon to false
		set theLat to 0
		set theLon to 0
		
		repeat with i from 1 to count of imageSel
			set this_image to item i of imageSel
			tell this_image
				set loc to get the location
				set lat to (the first item of loc)
				set lon to (the second item of loc)
				set withLat to (lat is not equal to missing value)
				set withLon to (lon is not equal to missing value)
				-- display dialog "lat is " & lat & ", lon is " & lon
				-- display dialog "withLat is " & withLat & ", withLon is " & withLon
				if (withLat is not equal to withLon) then
					error "An image has latitude or longitude bot not both"
				end if
				
				if (haveLoc and withLat) then
					error "Multiple images already have a location"
				end if
				
				if (withLat) then
					set haveLoc to true
					set theLat to lat
					set theLon to lon
				end if
			end tell
		end repeatrepeat with i from 1 to count of imageSel
			set this_image to item i of imageSel
			tell this_image
				set loc to get the location
				set lat to (the first item of loc)
				set lon to (the second item of loc)
				if (lat is equal to missing value) then
					-- display dialog "setting location to " & theLat & ", " & theLon
					set the location to {theLat, theLon}
				end if
			end tell
		end repeat
	end if
end tell

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst