Is there an easy way to make a macro to print the content in the system clipboard in a physical printer?
If the System Clipboard contains text (wether formatted or not formatted), print the text.
If the System Clipboard contains a picture/screenshot, print the picture.
Thanks, @appleianer. It works with text, but does not work with pictures/screenshots. I don't know how to make change to it, as I have very little script knowledge.
Edit:
I have successfully twisted the AppleScript to make it work with pictures/screenshots in the System Clipboard as well.
It pastes whatever is in the System Clipboard to the newly created document.
tell application "TextEdit"
activate
make new document at the front
tell application "System Events" to keystroke "v" using command down
print front document without print dialog
delay 1 --added a delay to watch the process
close front document without saving
end tell
I am glad @martin that you have found a solution. If you still want to make changes to the image to be printed, try this macro. In case you want to print an image in black and white and not in color the other way round:
Hello @appleianer,
Thanks. It's a good option to have when work with pictures in the System Clipboard.
The AppleScript I used above pastes whatever is in the System Clipboard. It could be either a text or a picture. Your macro works with pictures, but not with text.
What is the benefit of using it? You said of printing in black and white and not in color. I don't understand it. I don't have a color printer, so it has to be black and white printing.
If your macro does have extra benefits, I think we then need first to check if the System Clipboard contains a picture or just a text. I don't know how to do it either.