GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Button to copy Adobe image data as *.jpg


Hi friends, I would like to create a command that I run from a button to paste copied data from Photoshop as a *.jpg in a folder. Let’s say the name is now temp.jpg. I would then like it to continue and copy temp.jpg that was created to the clipboard. I also want it to overwrite the file temp.jpg each time. I want this because Directory Opus seems to be the best way to quickly paste Adobe (Photoshop, Illustrator, InDesign) data as a *.jpg so other programs do not have trouble with the format. Thanks

Clipboard PASTE=jpg:25 AS C:\DOClip\temp.jpg
//Clipboard SET "C:\DOClip\temp.jpg"
// the line above seems to create some recursive error in this case?
// How do I make it overite or just delete C:\DOClip\temp.jpg each time?

Edited: Also I should add that if I Right Click on C:\DOClip\temp.jpg in a folder and copy, I get exactly what I want when pasting into other applications. However, it seems that when I use the Opus command it does something different. When I go to the other application to paste it, nothing will paste (like it is the wrong type of data). Thanks


Try Clipboard COPY instead of Clipboard SET.


Try Clipboard COPY instead of Clipboard SET .

Super, thanks of the reply! That works great. Now I don't have an extra manual back and forth to paste over and over. Because Directory Opus is so great I can really automate this with a *.dcf. Right now I am mainly using (and was having the problem) when pasting image content into a FileMaker database. Adobe is the choice for image selection (all other programs fall short). So when I would paste it would show up as a WMF format instead of JPG. FileMaker executes a script to insert the pasted image. I can put launching the *.dcf in that script.

Delete FORCE QUIET "C:\DOClip\temp.jpg"
Clipboard PASTE=jpg:25 AS "C:\DOClip\temp.jpg"
Clipboard Copy AS C:\DOClip\temp.jpg

Thank You again! :slightly_smiling_face:


The Clipboard COPY command does not use the AS argument, so that bottom line should be just Clipboard COPY.

Even then, I am not sure why that command would work, since it isn't being told which file to place in the clipboard. The only way I can see it working is if you are already looking at C:\DOClip when you run the button, so that the temp.jpg file is selected as it is created, which then causes the last line to put that file in the clipboard. Otherwise, the last line would either place some other file (that was already selected in the folder you're in) or do nothing.

If it's appearing to work as-is, it might just be that the program you are pasting into accepts the original bitmap data that's still in the clipboard.

(You should be able to reliably perform the three steps using a script, if needed.)