|
|
OnMyCommand
I use OnMyCommand from Abracode which could be used, too, I suppose. Perhaps something like this seudo code:
echo "file://" + {objectpath} | tr " " "%20" | pbcopy
I may try this when I get a chance and post real code at that time.
OnMyCommand
tr won't do what you want it to, you'll have to use sed:
(with a space between the '/')
The Finder does this
The Finder can get the file: protocol URL of any object. Here's the AppleScript code to do it:
So, to do this from the command-line, you'd use:
You get the idea. Now, if you wanted to make a droplet AppleScript, you'd need to put this code into it:
Now, this only handles one item. You could rework it to give a return-delimited list of file URLs for multiple items, but iCal only wants one item, right?
The good thing about using the Finder is that it should do all the character-conversion for you. I think. :-)
The Finder does this
If I may just make a small addition. It'd be really handy to have the Finder put the URL in the clipboard for easy pasting into iCal. So here we go:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|