Hi,
I’m trying to improve upon a script which has been written to transfer a selected file from Itunes to Ableton. Unfortunately, it seems like Ableton has no Applescript support, so the only option is to use the clipboard as an intermediary. We’ve already managed to produce some working code using keystrokes and show finder, but it would be much neater if we could simply pass a file handle to clipboard and tell it to copy the raw data.
I have had a search around here and the net, but nearly all of the examples I have seen concern converting text. The only exception being this thread here:
http://macscripter.net/viewtopic.php?id=12668
This was inconclusive, although it did seem that this may not be possible. What I have managed to achieve is the following:
set clipboard to (read theTrackName as file)
where theTrackName is an alias to an audio file. The result of this script is that the raw data is copied to the clipboard, but it does not retain data type - i.e. it pastes as gobbledygook into another application.
I would very much appreciate it if anyone out there knows how to get the data to retain its type.
Many thanks,
James