Can't find Pixelmator's Style & Effect & Export options inside Mac's Automator App

Is something not working like it should? Let us know.
User avatar

2021-05-20 09:26:34

Hi team,
We are trying to experiment with automation using Mac's Automator App and Pixelmator Pro, but can't find inside Automator's menus Pixelmator's Style & Effect & Export options to give the next command to Automator.

Here is what we see:
Image
but can't find inverted effect.
And, seems there are no Style (we wanted stroke with inner shadow) & Export options (max quality, for web, and 0,5 size)
Did we miss something? Should we activate something inside Pixelmator or Automator App?
Would you be so kind to explain!

Sincerely,
Igor
User avatar

2021-05-20 10:33:13

Automator doesn't really offer this functionality, I'm afraid. You can only apply color adjustment as presets there. So if you need to apply the Invert adjustment via Automator, you'd want to create a preset for it first. Applying individual color adjustments is possible using AppleScript, though. It's a bit more advanced automation technique but it should do exactly what you're looking for. You can learn more about working with AppleScript here.
User avatar

2021-05-20 11:44:04

Hi Aurelija,
by Aurelija 2021-05-20 10:35:12 Automator doesn't really offer this functionality, I'm afraid. You can only apply color adjustment as presets there. So if you need to apply the Invert adjustment via Automator, you'd want to create a preset for it first. Applying individual color adjustments is possible using AppleScript, though. It's a bit more advanced automation technique but it should do exactly what you're looking for. You can learn more about working with AppleScript here.
I read the post 3 times, it's a pity, but the tutorial very-very basic with a lot of missing steps to really understand Apple Script & Pixelmator possibilities.
The second problem - the recommeneded Resources (in the end of article) are not good, maybe exept Apple's official guide, which is not dedicated to normal people without programming skills. The other links brings you to so outdated websites with a design from early 2000s.

Aurelija, whould you be so kind to explain is it possible, in theory, to implement our workflow with Apple Script and Pixelmator. Nothing extrodnary! Open files from one folder, make few style changes, add outline effect and save with different format. The problem is everything should be done with few thousand images. I think, many photographers will follow this guide with little changes from their side. It's 100% photography related.

Sincerely,
Igor
User avatar

2021-05-21 15:05:26

I agree that some scripting background is a plus when getting started with Apple Script. But even if you haven't written a single line of code in your life, I'd still suggest simply giving it a try and see how it goes. From my experience, it really isn't as intimidating or complex as it may first appear. I've never coded before either and I'm far from being actually good at it but I can say for sure that with a bit of trial and error, it's possible to have quite a lot done.

The workflow you're going for seems fairly simple, too, so it shouldn't be too difficult to script. I've whipped up the workflow below (with some comments indicated by "--") to give you a head start. Try running it in Script Editor:
tell application "Pixelmator Pro"
	--Choose the images to process.
	set originalImages to choose file with prompt ¬
		"Please select the images to process:" with multiple selections allowed
	--Choose where you want to save the exported images. 
	set exportLocation to choose folder with prompt ¬
		"Please select where you'd like export the images:"
	repeat with a from 1 to number of originalImages
		set currentImage to open item a of originalImages
		tell the styles of the first layer of the front document
			--Here is where you specify the styles you want. 
			set its stroke width to 30
			set its stroke position to inside
		end tell
		--File export happens here. Indicate the file format and the extensions you want to attach to the exported files.
		export currentImage to file ((exportLocation as text) & ¬
			name of currentImage & "-edited" & ".jpeg") as JPEG
		close currentImage without saving
	end repeat
	display notification (number of originalImages as text) & ¬
		" images have been successfully edited." with title "Style edits"
end tell
This script adds a 30-pixel wide stroke to the first layer of your document. You can change these properties or add additional ones by looking them up in the Pixelmator Pro scripting dictionary. Let me know how it goes!