I constantly find myself utilizing all 4 system clipboards. One way I do this is by sending what’s currently in my clipboard (general) to 1 of the other 3 available clipboards (find, font, or ruler).
This is a shortened version of the code I use to store what’s currently on my clipboard to a different clipboard.
property theClipboards : {"general", "find", "font", "ruler"}
activate
set chosenClipboard to (choose from list theClipboards ¬
with title "Choose Your Desired Clipboard" with prompt ¬
"Send The Content Of Your Main Clipboard To A Different Clipboard" default items ¬
"font" OK button name "OK" cancel button name "Cancel") as string
do shell script "pbpaste -pboard general | pbcopy -pboard " & ¬
quote & chosenClipboard & quote
The problem is though, after doing this a few times, you start to forget which clipboard has which data. Sometimes this turns into a nightmare. This following code is my solution to that problem. It allows you to choose a certain clipboard and view it’s contents quickly.
property theClipboards : {"general", "find", "font", "ruler"}
activate
set chosenClipboard to item 1 of (choose from list theClipboards ¬
with title "Choose A Clipboard" with prompt ¬
"Choose a clipboard to view its contents." OK button name ¬
"View Chosen Clipboard" cancel button name "Cancel")
set theResult to displayClipboard(chosenClipboard)
activate
display dialog theResult buttons {"OK"} default button 1 ¬
with title ("Contents of Pasteboard " & chosenClipboard) giving up after 5
to displayClipboard(chosenClipboard)
set theResult to (do shell script "pbpaste -pboard " & chosenClipboard)
end displayClipboard