Jump to content
Macro Express Forums

Adding a File to the Clipboard


Recommended Posts

Hey everyone,

 

Is it possible to add a file to the clipboard which then could be dropped via paste command into an Application?

To be exact, like you would STRG+C a selected file in an explorer window. The closest I could find is the "Clipboard File Copy" command, though it adds the file's contents to the clipboard, not the file itself. If it isn't possible, any workaround suggestions would be appreciated.

 

Thanks in advance

Link to comment
Share on other sites

Not in MEP. But if you look in the File Explorer ribbon there's a command to copy selected item's path as text.

You can also SHIFT+RightClick to get the expanded context menu which has that same feature. 

2021-03-08_07-38-38.jpg

Link to comment
Share on other sites

That's not exactly what I was looking for. To be more specific on what I'm trying to do:

 

Some Applications allow Drag&Drop to open files. Now, some allow copying the file itself and pasting it in the application for the same effect. 

That's when I thought I could use MEX to make something neat out of it and avoid an explorer window altogether. Though it doesn't seem like MEX is able to retrieve the informations the clipboard gets when doing a STRG+C on the File itself in an explorer window.

Link to comment
Share on other sites

Alexis,

 

I'm still unclear about what it is you want to copy/paste? Activated and copied from where? Pasted to where? Apparently not copying the content, you said. (That's what I'd have assumed 'add a file' meant.) So do you mean its full path and filename?

 

I have a macro that does that, used many times daily. With a filename in File Explorer selected, it copies its full path and filename to the clipboard. I can then do various things with it, typically paste it manually somewhere else, such as in a Save As dialog. Or an Open dialog of any other application.

 

As usual, the devil is in the details!

 

Terry

 

Link to comment
Share on other sites

Ok I will try to be more specific, I have 2 windows open. One just the Windows File explorer with a folder of .mp3s, the other is Ableton Live which is a Music Production Program, let's assume they are side by side. Now I can Drag&Drop an .mp3 from the File explorer to the Ableton Software, and it would load. I can also select a File in the Windows File Explorer and press STRG+C to issue a clipboard copy command and use STRG+V on the Ableton window for the same effect as i'd open that .mp3 via drag&drop. Now, I thought using Macro Express to "grab" a specified .mp3 file instead of having to drag&drop or "copying" it to open it in Ableton. If that would be possible I wouldn't need to have a File Explorer window open. So literally having MEX load an .mp3 file into an open Ableton Instance. 

 

Does this explanation make more sense?

Link to comment
Share on other sites

Thanks, that's  much clearer.

 

The macro to do that should be straightforward, with steps as follows.

1. The macro will be activated from File Explorer, with a file selected (e.g an MP3 or any other type that Ableton can open/import)

2. It then captures its full path and filename and copies that text to the clipboard. Use both edit mode on the file and the Address box to achieve this. Post again showing us your macro if you can't get it working.

3. The macro then activates Ableton and uses either its menu or KB shortcuts to open the File Open or File Import dialog

4. Finally it pastes in the required file details. (Or, for greater flexibility, define a variable in step 2 and type that in here.)

5. That music track should then open in Ableton.

 

Terry

 

Link to comment
Share on other sites

Thanks for the suggestion, though that wouldn't really accelerate my workflow compared to just doing it manually via drag&drop, I thought there was a way to achieve this without needing an opened File Explorer window, or going through the File import dialog. But it seems it's just not possible for MEX to grab a whole file in the Background, the same way STRG+C does in the File explorer. 

 

Thanks for the answers. 

Link to comment
Share on other sites

I assumed that you wanted to do this from any folder. And with any of its files.

 

It’s even easier if the folder is unchanged. But how can you, or therefore the macro, “grab a specified .mp3 file”? How is it specified, if not by selecting it in an open folder or typing its name? Once it’s “grabbed” it can then be opened by the macro automatically as I described.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...