OK, here’s the deal. I have file locations in URL form:
file://localhost/Users/spark/Music/iTunes/iTunes%20Music/Tobin,%20Amon/Permutation/08%20People%20Like%20Frank.m4a
I need the path forms:
/Users/spark/Music/iTunes/iTunes Music/Tobin, Amon/Permutation/08 People Like Frank.m4a
Macintosh HD:Users:spark:Music:iTunes:iTunes Music:Tobin, Amon:Permutation:08 People Like Frank.m4a
I want a way to get Applescript (Tiger) to do all the conversion work for me. No string manipulation, no handlers to unescape %XX, no stripping “localhost”, no osaxen, no figuring out which application understands which file types, nothing. That is, what I really want is just a type coercion, like:
return path of (theURL as alias)
Of course that doesn’t work. But surely the necessary functions are hiding in here somewhere. Any ideas?