Jump to content

Recommended Posts

Posted
Quote

Alfred uses the clipboard when obtaining the selected item with a hotkey.

 

I want option whether save the selected item with a hotkey to Clipboard History.

 

Posted (edited)

@vitor

Thank you for your reply.

 

1 hour ago, vitor said:

You only need to copy as usual (⌘C) to save to the Clipboard History. If you want to have a Hotkey to copy without saving, you can make a Workflow: connect a Hotkey Trigger (Argument: Selection in macOS) to a Copy to Clipboard Output (check Mark item as transient in clipboard).

 

I made Workflow: only Hotkey Trigger (Argument: Selection in macOS), but Alfred save the selected item to the Clipboard History when I execute this WorkFlow.

 

workflow.png.65aad6a4845f6799c122ce609bf05652.png

 

I don't want save the selected item to the Clipboard History.

What should I do?

 

Pardon my broken English.

Edited by oskamathis
Posted

That Workflow is incomplete. Also, please don’t post screenshots to Workflows, but rather upload them so we can test where they might be wrong.


Either way, I induced you in error. I forgot that to get the selection when using a Hotkey, Alfred uses the clipboard, so the item is already saved to the history by the time it reaches the Copy to Clipboard Output.


Let’s go about this a different way. Why do you want to have some items saved to the clipboard history and others not? What’s your use case?

Posted
1 hour ago, vitor said:

That Workflow is incomplete. Also, please don’t post screenshots to Workflows, but rather upload them so we can test where they might be wrong.

 

I'm sorry. I'll be careful from now on.

 

1 hour ago, vitor said:

Why do you want to have some items saved to the clipboard history and others not? What’s your use case?

I want to translate the selected item and save it with the original text to the clipboard history.

Ideally, both the original text and the translated text are saved in one history.

I often compare both, so I don't need history of only original text.

 

I made example Workflow.

Where should I upload it?

 

Posted
10 hours ago, oskamathis said:

Ideally, both the original text and the translated text are saved in one history.

 

So you want to combine both texts, in a way that when you ⌘V it pastes both at once? Could you be looking for the Merging feature?

Posted (edited)

@vitor

 

I found this topic.

This is what I really wanted to do.

 

Finally I wrote shell script as below,

/usr/bin/sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb "DELETE FROM clipboard WHERE dataType = 0 ORDER BY ts DESC LIMIT 1;"

original=$1
translated=$1 # any translation logic

echo -n $original
echo ""
echo ""
echo -n $translated

and connected Run Script to Copy to Clipboard.

 

I'm sorry to cause so much trouble.

Thank for kindly letting me know many things.

Edited by oskamathis
  • vitor changed the title to [SOLVED] Option whether save the selected item with a hotkey to Clipboard History

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...