Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Access music in iTunes without adding to library' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Access music in iTunes without adding to library
Authored by: leenoble_uk on Apr 13, '05 12:06:39PM

I just whipped up this script which automatically re-shares your default folder whenever you download something.

You need to save it as a folder action and have UI Scripting enabled in assistive devices. It could be modified to detect file type I'm sure and it may also be possible to have it detect the path of the folder which it is attached to and automatically put it into MusicPublisher's settings. YMMV

---
So, I said ... well, I can't actually remember exactly what I said. But it was one of the most enormously cruel and frighteningly witty put downs ever.

[ Reply to This | # ]

Access music in iTunes without adding to library
Authored by: leenoble_uk on Apr 13, '05 12:52:11PM

I've expanded the script so that it now will automatically tell MusicPublisher to publish the directory to which the script is attached. You can attach it to multiple folders and it will always share the most recent one you've moved a file to. It also hides the application.

Here's the new version.

on adding folder items to this_folder after receiving added_items
	set thePath to POSIX path of this_folder
	tell application "MusicPublisher"
		activate
	end tell
	tell application "System Events"
		tell process "MusicPublisher"
			if (exists of (button "Stop" of window 1)) is true then
				click button "Stop" of window 1
				delay 2
			end if
		end tell
		tell application "MusicPublisher" to quit
		delay 2
		do shell script ("defaults write org.tynsoe.musicpublisher source " & quoted form of thePath as string)
		tell application "MusicPublisher"
			activate
		end tell
		delay 2
		tell process "MusicPublisher"
			click button "Publish" of window 1
			set canHide to false
			repeat while canHide is false
				delay 2
				if exists (sheet 1 of window 1) is false then
					set canHide to true
				end if
			end repeat
			delay 2
		end tell
		set visible of process "MusicPublisher" to false
	end tell
end adding folder items to

---
So, I said ... well, I can't actually remember exactly what I said. But it was one of the most enormously cruel and frighteningly witty put downs ever.

[ Reply to This | # ]