Automation scripts no longer working since update?

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

2022-03-15 15:00:18

I created a couple of custom scripts to automate exports from Pixelmator Pro, which were working nicely with the previous version. I've since updated to 2.3.5, and now both scripts just finish without exporting anything, though there are no errors.

I'll include one of these scripts below, for reference. The Finder part of the script still works as expected, but once it gets to the Pixelmator script, nothing else happens.
on run {input, parameters}
	
	set desktopPath to (path to desktop as text)
	
	set folderPath to desktopPath & "Frames"
	
	set exportFolder to ""
	
	tell application "Finder"
		
		if (exists folderPath) is false then
			
			make new folder at desktopPath with properties {name:"Frames"}
			
		end if
		
		set exportFolder to folder folderPath
		
	end tell
	
	tell application "Pixelmator Pro"
		
		set animationFile to front document
		
		set framePrefix to (exportFolder as text) & name of animationFile
		
		set visible of (every group layer of animationFile) to false
		
		repeat with a from 1 to (number of group layers of animationFile)
			
			tell animationFile
				
				if (a > 1) then
					
					set visible of currentFrame to false
					
				end if
				
				set currentFrame to item a of group layers
				
				set frameName to name of currentFrame
				
				set visible of currentFrame to true
				
			end tell
			
			export for web animationFile to file (framePrefix & frameName & ".png") as PNG
			
		end repeat
		
		set visible of (every group layer of animationFile) to true
		
	end tell
	
	return input
end run
User avatar

2022-03-16 11:08:26

Hey Brooke! Any chance you're using this script as a Quick Action? I've shared the script with the team but we're not sure about the on run {input, parameters} part.
User avatar

2022-03-16 14:16:58

I am, sorry! I should've mentioned that I'm running these scripts through the "Services" menu within Pixelmator Pro.

That part of the script is what Automator adds automatically to a Run AppleScript block in a Quick Action:
Image

I had also created a support ticket for this and got a response this morning that it's being looked into. Wasn't sure if it would be better to work through this here on the forum or there.

Thanks for your help!
User avatar

2022-03-17 11:55:39

Got it, that's what we've assumed. I'll let the team know! Oh, and whether you share feedback on the forum, via email, or social media doesn't really matter, it gets to the right people in development eventually. So you can choose whichever method is more convenient for you. :)