AppleScript to automount an ISO image?

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
ewoo
Bruji Friend
Bruji Friend
Posts: 11
Joined: Wed May 02, 2007 9:37 am

AppleScript to automount an ISO image?

Post by ewoo »

I prefer DVDPlayer over VLC when playing backed-up DVDs. (I think it's more efficient; ie. does a better job on my G4 mac mini.) But I like keeping my DVDs in ISO images over the raw VIDEO_TS files...

Could someone help me out with an AppleScript to:
1. Automount the ISO image
2. Inject this code into DVDPedia's play scripts--right before it launches DVDPlayer
3. Dismount the ISO when done (may be tricky?)

TIA,
Woo
ewoo
Bruji Friend
Bruji Friend
Posts: 11
Joined: Wed May 02, 2007 9:37 am

Post by ewoo »

OK, I figured out the approach but I don't know how to implement it...

Ideally, I'd like to stuff this script into the part where DVDPedia launches external fies...

Since System\Library\CoreServices\DiskImageMounter.app is not AppleScriptable (to my knowledge), we need an AppleScript that will run some commandlines on Terminal...

First, this script will take in as a argument (param), the file path of the ISO file. Then, the script will poll and wait until the image in mounted. Once it's mounted, the script will launch Apple DVDPlayer at which point it should automatically play the image that just got mounted.

On the other end, I guess we need to Eject the mounted disc when we head back to DVDPedia. Now coordinating that action is a little bit tricky.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

I have updated the current beta so that when you have an .iso link it check inside the mounted volume for a VIDEO_TS folder, if it find one it plays it. Get the DVDpedia beta and with linked .iso DVD files the movie should start playing.

Also use this in the terminal to set VLC as the default for VIDEO_TS fodlers:

Code: Select all

defaults write com.bruji.dvdpedia "VLC for VIDEO_TS" -bool YES
Post Reply