Skip to content

Instantly share code, notes, and snippets.

View nilswindisch's full-sized avatar

Nils Windisch nilswindisch

View GitHub Profile
@nilswindisch
nilswindisch / openClipboardContentInBrowser.applescript
Created August 29, 2011 15:10
Opens the clipboard content in the default browser #applescript #itunes #nilswindisch
set the clipboard to «class ktxt» of ((the clipboard as text) as record)
set theUrl to (the clipboard)
open location theUrl
@nilswindisch
nilswindisch / removeFileFromItunes.applescript
Created August 29, 2011 14:57
Removes one more selected files (in iTunes) from iTunes and moves them to the trash
tell application "iTunes"
if selection is not {} then
set allTracks to selection
repeat with this_track in allTracks
set the file_to_delete to (get location of this_track)
set thisOne to this_track
delete (some track of library playlist 1 whose database ID is (get database ID of thisOne))
tell application "Finder" to delete the file_to_delete
end repeat
end if