oskamathis Posted July 14, 2020 Posted July 14, 2020 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.
vitor Posted July 14, 2020 Posted July 14, 2020 Welcome @oskamathis, 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).
oskamathis Posted July 15, 2020 Author Posted July 15, 2020 (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. I don't want save the selected item to the Clipboard History. What should I do? Pardon my broken English. Edited July 15, 2020 by oskamathis
vitor Posted July 15, 2020 Posted July 15, 2020 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?
oskamathis Posted July 15, 2020 Author Posted July 15, 2020 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?
vitor Posted July 15, 2020 Posted July 15, 2020 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?
oskamathis Posted July 15, 2020 Author Posted July 15, 2020 (edited) @Andrew This isn't what I looking for. Thank you for looking. Edited July 15, 2020 by oskamathis
oskamathis Posted July 15, 2020 Author Posted July 15, 2020 (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 July 16, 2020 by oskamathis
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now