How to determine what the type of content in clipboard is in macOS?

1

I am working on an Keyboard Maestro macro to save the clipboard content to hard drive and then pass the file to Yoink :

enter image description here

Since there will be lots of kinds of content put into clipboard, e.g. PNG, JPG, TXT, RTFD etc. I know I should determine the content type. Then I come up with Clipboard Condition :

enter image description here

It is frustrating that Clipboard Condition currently only supports the function of handling text. So, can I use Keyboard Maestro to determine what the type of content is in clipboard? In my case, if there is any way to automatically save the content of clipboard to hard drive that would be great.

Since Keyboard Maestro has great capacity of different kinds of scripts, if some shell scripts, Unix Software, Python Tools could return the clipboard type will also helpful.

Oscar Gong

Posted 2018-09-04T16:32:44.420

Reputation: 11

1

You can use AppleScript as in AppleScript: How to check if the clipboard consists of a file (instead of text)?

– DavidPostill – 2018-09-04T16:37:12.650

No answers