Jump to content

Recommended Posts

Posted

Hello everyone,

 

it would be pretty cool if it would be possible to select multiple Files, Clips or whatever from the Clipboard history and paste it.

For instance:

 

I would have copied a few files and wanna paste them. Here is an example:

58a1e04395623_ScreenShot2017-02-13at17_34_55.thumb.png.05f92decdf1218547a3b264ce28f630b.png

 

If i could now just press Shift+Arrow down to select multiple items and then just paste them that would be awesome :D

If there is another way then lemme know, but else this would be decent to have.

 

Another addition to that would be the ability to change the Shortcut for adding files to the file buffer. Something like

⌘+C and ⌘+V would make the file Buffer/Navigation even better :)

 

Cheers,

 

Frozen

  • 3 months later...
  • 4 weeks later...
Posted
On 6/29/2017 at 4:39 PM, deanishe said:

Düsseldorf? Surely you mean trash multiple files at once?

 

haha, that are documentation pictures from work whenever im there ^^

  • 1 year later...
Posted

I did some investigation into this, and in theory it's possible to do..

 

Clipboard items are stored in an SQLite database here: 

~/Library/Application Support/Alfred 3/Databases/clipboard.alfdb

If an entry is an image, it's file type is indicated via `dataType` column, and the file name is saved to a column named `dataHash`.

 

The files themselves are saved to the following directory:

~/Library/Application Support/Alfred 3/Databases/clipboard.alfdb.data

In theory, it'd be possible to do it this way:

 

- Gather `{n}` items from clipboard.alfdb via a simple database query

- Iterate through items and append each to an in memory text object

- Any items that have a `dataType` of `1` should be located in the `clipboard.alfdb.data` directory and probably need to be converted to blobs with:

base64 -in "~/Library/Application\ Support/Alfred 3/Databases/clipboard.alfdb.data/$ITEM_DATAHASH"

- Append blob to in memory text object 

- Copy in memory text object to clipboard no more items to iterate over


It's probably a bit more tricky than this, I don't know if you can just copy a blob and some plaintext to the clipboard and paste it as file plus the plaintext, because the blob is plaintext. 

Posted
3 minutes ago, bnwd said:

It's probably a bit more tricky than this, I don't know if you can just copy a blob and some plaintext to the clipboard and paste it as file plus the plaintext, because the blob is plaintext. 

 

You can't. Clipboard data is typed (with UTIs). While you can theoretically just smash a blob of text+binary data in there, it isn't going to paste well.

 

You'd probably need to save the text items to discrete files, then put a sequence of filepaths on the clipboard.

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...