Feature request: "Copy merged" with AppleScript

What features would you like to see in Pixelmator Pro?

The Pixelmator Community has been archived and cannot accept new posts or comments.

User avatar

2021-10-08 16:20:46

I can `copy` with AppleScript, but don't see a way to copy merged. I can `merge all` and then `copy`, but I would prefer for the operation to leave the image layers as-is.

I've tried this as a workaround:
tell application "System Events" to keystroke "c" using {option down, command down, shift down}
But it seems more timing-sensitive and thus unreliable. (And could break if the user remaps shortcuts; though I guess one could also navigate the menu hierarchy to trigger it.)
User avatar

2021-10-08 18:23:48

My specific use case is for this script: https://gist.github.com/henrik/134f9613 ... d2348c5983

I'm currently working around it by merging all layers, then copying, then undoing the merge.
User avatar

2021-10-11 13:00:09

Hi Nyx. The Copy Merged option isn't scriptable itself yet but I can see you're using System Events to use other Pixelmator Pro features, so I think you should be able to do the same for Copy Merged:
tell application "System Events" to tell process "Pixelmator Pro" to click menu item "Copy Merged" of its menu of menu bar item "Edit" of menu bar 1
Feedback noted, though!
User avatar

2021-10-11 15:35:09

Hi Aurelija! Yeah, I think I probably had not started using System Events when I asked the question :)

Having it built in would have some benefits, of course – less to type, less permissions to request (I think), and I don't know if scripting the menus will break if the user does not have an English-locale system.

Thank you for noting the feedback :)
User avatar

2021-10-15 14:04:36

by Nyx 2021-10-11 12:35:09 Hi Aurelija! Yeah, I think I probably had not started using System Events when I asked the question :)

Having it built in would have some benefits, of course – less to type, less permissions to request (I think), and I don't know if scripting the menus will break if the user does not have an English-locale system.

Thank you for noting the feedback :)
The Copy Merged menu option is typically hidden (it will show up if you search via Help), so it's possible that it simply wasn't visible to you in the menu. Either way, at least it's something that works for you in the meantime. :ok_hand: