Export to Clipboard

Always once again in the past, there have been user requests how Mp3tag can export tag data to the Windows Clipboard.

I did several attempts to solve this question, using different commandline applications executed from the Mp3tag "Tools" context menu.
But I was not satisfied with the handling and the results.

When the command line comes into play, then you have a lot of work with the escaping of special characters and so on.
Depending on the command line tool, it was impossible, either not at all or only very cumbersome, to handle more than one file by one request to the tool item.
And formatting the data is restricted or quite impossible.

I remembered that Mp3tag has already an "Export" feature for outputting text into files, but sadly not to clipboard directly.
By using a dedicated export script Mp3tag can export tag-data from one file or from thousand files by just one call.

So I had to find a way to put the text from an output file to the clipboard.
And I knew it immediately: nothing is easier than that!

I wrote a Mp3tag export script, which in turn produces a HTA script, which will be saved into the user's temp folder.
While the export script is running, it collects all data from the selected files using the Mp3tag Export Scripting Language as usual.
The export script creates an output text file of file type "hta", which contains the text data for putting to the clipboard and the HTA related commands to do so.

After exporting, Mp3tag asks the user to open, respectively to display, the just created file.
When answering with "Yes" the HTA script will be executed and puts all previously collected text data to the clipboard.
After putting the text data to the clipboard, the HTA file removes itself from the disk.

A Message Box will display the number of lines and bytes, which have been put to the clipboard.
Now you are ready to paste!

During the test it was possible to send Textdata to the clipboard of about 25 MB size and 730.000 lines.
If it was more than this limit, then the clipboard announces successful reception, but in fact it was empty.

Attached is an example script, which collects a set of informations from the Mp3tag technical placeholders for each selected file, and then puts the list to the clipboard.

(20131130.Export.SystemFieldsToClipboard.rar ( 3.02K ) Number of downloads: 3)

20131201.Export.SystemFieldsToClipboard.rar (3.89 KB)

Attached is an example script, which produces a list of Artists and Albums, and then puts the list to the clipboard.
20131201.Export.ArtistAlbumTracksToClipboard.rar (3.6 KB)

To adapt the export script to your needs, just edit the block between the html tags
... here is your export code ... .


20131201.Export.SystemFieldsToClipboard.rar (3.89 KB)

20131201.Export.ArtistAlbumTracksToClipboard.rar (3.6 KB)