Re: Delete Bug or Feature?
Re: Delete Bug or Feature?
- Subject: Re: Delete Bug or Feature?
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 12 Feb 2008 11:28:37 -0800
- Thread-topic: Delete Bug or Feature?
>> There is no way to remove a track from iTunes via AppleScript and
subsequently keep its file, which is an option when you manually delete a track
using the Delete key.
First, for those following along at home, there is a way via appleScript to
remove a track from the library play list without moving the file to the
trash.
Dress this up in a handler and it works.
> tell application "iTunes"
> set myTrack to item 1 of the selection
> set trackFile to location of myTrack
> end tell
> tell application "Finder"
> set fileLocation to (container of trackFile) as alias
> set holding to path to temporary items as alias
> set tempHold to move trackFile to holding
> tell application "iTunes" to delete myTrack
> move tempHold to fileLocation
> end tell
>>Doug>>That's an OK workaround, and one that had occurred to me, but rather
cumbersome what with all the moving of files.
Agreed, but remember, as long as you're moving files on the same volume the
move command doesn't actually move the file, so it's not as cumbersome as
moving or networks or copying. This solution works, it hardly adds any time
to execution and will be virtually invisible to your users, and may even
survive whatever bug fix apple comes up with.
So, now we can take our "AppleScript problem solvers" hats off and put our
"AppleScript Apologists" hats on.
On behalf of AppleScript I am so sorry we have have to find a workaround to
this bug. Please forgive Apple, AppleScript and iTunes and everyone one of
us who use and promote these technologies.
; )
>>Doug>>This is a bug with iTunes that should be fixed.
Totally agreed
>>Doug>>As I have mentioned, perhaps a distinctive "remove" command should be
added
Again, agreed, and "Remove" would be consistent with the behavior of the
user interface.
In the UI when you delete a track you're asked to confirm you want to
"remove" it from the playlist and then asked if you want to "move it to the
trash".
I'm thinking that if they do add a remove command the delete command will
then behave the way it is now, and it may be possible that we're seeing a
work in progress.
Maybe they've changed the behavior of the delete command before adding a new
remove command.
Wouldn't put it past them.
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden