I’m getting the error “The Command “Copy” is not available”. I got this code directly from Alchemist. I’m not sure if the issue is with the generated code or if the issue is on the Photoshop side.
This should Select All and then Copy. I tried on a flattened image and also on a single layer image with a normal (not background) layer. In either case it gives the same message. It does do the Select All part. The copy command is available in the Photoshop menu. I also tried just the copy batchPlay command with a selection already made which gives the same message.
I would expect this error if the active layer was an adjustment layer or something that couldn’t be copied. but it is just a normal layer. I also tried using “cut” and it did the same thing.
If it is a bug in the Photoshop side then I will report the issue. However, I’m not sure if the bug is with Photoshop or with the generated code.
OK, I just tried that. It doesn’t give the error anymore. But it also doesn’t copy the selection to the clipboard either. At least on my computer it doesn’t.
Hi @simonhenke,
Can you give an insight on how you came across this tweak to the code to get it working? Is there some secret batchplay society I’m not aware of?
I had the same error but I know next to nothing about batchplay so was stuck until I came across your post.
@johnt When it comes to batchPlay, it always starts with some trial and error, but after some time you get used to it and learn more about the way it works and its properties.
The isCommand: true/false can generally be left out. It’s just for Photoshop to know which event to execute. Whenever some instance (e.g. a plugin) is actively listening for certain events, a copy of the Descriptor is “send out” with isCommand: false. So if you leave it out it should default to true.
I don’t know why the dialogOptions cause any problems, but they also don’t make a lot of sense in the context of a copy event as there’s no dialog involved. I’d recommend only inserting such properties when you’re actively trying to control the dialog behavior, not just put it into every descriptor for no reason.
After all, if you think about it, it makes sense that a copy event descriptor doesn’t need any additional payload / information.