This variation on an old hack still seems to work. Still awful, though.
set alpha to {property1:"4", property2:"oops", property3:"what"}
set the clipboard to alpha
set beta to (record {«class usrf»:(the clipboard as list)} as record)'s «class seld»
--> {property1:"4", property2:"oops", property3:"what"}
Although this is faster:
set alpha to {property1:"4", property2:"oops", property3:"what"}
set the clipboard to alpha
set beta to (run script "on run {fred}
return fred
end run" with parameters {{«class usrf»:(the clipboard as list)}})
--> {property1:"4", property2:"oops", property3:"what"}
Like Yvan’s suggestion, these don’t work where the record’s labels are reserved terms like ‘name’ or ‘date’, but that’s the way the clipboard works, not the fault of any of the scripts.
I’ve been fooling with MidiPipe for a couple of days, although I don’t have a MIDI system with which to test it properly. It’s certainly very limited AppleScriptwise, with only one command of its own and the ability to run script modules much like Automator’s which have no connection with each other — except possibly by passing MIDI messages down the pipes they’re in or injecting them into other pipes using the one command. It’s also difficult to offer scripting suggestions when its not totally clear what has to be passed between pipes (actual MIDI data or just indicative signals?), why, and whether or not it’s possible to rationalise the piping set-up itself. I imagine the transfer of information and the acting upon it would have to happen very quickly in a musical situation.