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


Click here to return to the 'Play DVDs automatically on insertion in VLC media player' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Play DVDs automatically on insertion in VLC media player
Authored by: petertheartist on Dec 28, '10 07:09:07PM

I know this is an old thread, but, I could never get this script to work. The rdisk number for my optical drive was always changing, depending on what external hard drives, or flash drives were connected, or if my external burner had a disk in it at the time, etc.
So I worked out this script which will work regardless. (I think you need UI scripting turned on, mine was already on):

tell application "VLC"
activate
end tell
tell application "System Events"
key down command
keystroke "d"
key up command
delay 3
keystroke return
tell application "VLC"
play
fullscreen
end tell
end tell



[ Reply to This | # ]
Play DVDs automatically on insertion in VLC media player
Authored by: iMacThere4iAm on Jan 04, '12 04:21:12AM
Here is an alternative that doesn't require UI scripting. It should be faster and more reliable.
set devicename to do shell script "drutil status | grep -o /dev/disk.*"
set MRL to "dvdnav://" & devicename
tell application "VLC"
	OpenURL MRL
	play
	next
end tell


[ Reply to This | # ]