@winston
Sorry, my previous post was sloppy (I was just happy that I figured out my problem guess)
The script I was working on is the "batchRip.scpt" script. I opened it in script editor and made the following changes.
First I ripped out growl due to known issues with it on Snow Leopard.
From:
-- Setup Growl Support: Set useGrowl to yes and set the path to the GrowlNotifyLib.scpt.
property useGrowl : yes -- If you have growl, set to yes. Default is no.
To:
-- Setup Growl Support: Set useGrowl to yes and set the path to the GrowlNotifyLib.scpt.
property useGrowl : no -- If you have growl, set to yes. Default is no.
Then I changed the line that tells system events which disks to grab for the rip from:
tell application "System Events" to set DVDs to name of disks whose capacity is less than 8.589934592E+9
to
tell application "System Events" to set DVDs to name of disks whose capacity is less than 8.589934592E+9 and capacity is greater than 0
Here is the script with my modifications: (again I have ripped out growl due to know issues but I hardly used it so I probably wouldn't put it back in when a growl update is available)
Code: Select all
---------- BatchRip.scpt ----------
---------- Updated: 01-22-2009 ----------
(* This script opens DVDs with FairMount and copies them to a destination folder with a ditto shell script. This script includes support for dual DVD drives installed in a Mac Pro, if two disks are inserted. This script also uses Growl to notify you when completed *)
global diskCount, dvd1Src, dvd1copy, dvd2src, dvd2copy
---------- Properties ----------
-- The output directory for all DVD files. Default is ~/Movies/BatchRip. This folder will be automatically created on first run.
property outputPath1 : "~/Movies/BatchRip"
-- Set ejectDisk to yes if you want your disk(s) to eject when completed. Default is no.
property ejectDisk : no
---------- Optional Properties ----------
-- Dual-Drive: If you have two DVD Drives, you can set a second output directory below to rip two disks at once. The default is ~/Movies/BatchRip2. This folder will be automatically created if 2 disks are mounted and the script is executed.
property outputPath2 : "~/Movies/BatchRip2"
-- Setup Growl Support: Set useGrowl to yes and set the path to the GrowlNotifyLib.scpt.
property useGrowl : no -- If you have growl, set to yes. Default is no.
-- property growlTitle : "Batch Rip"
-- property growlLibraryPath : POSIX file "/Users/dahl/Movies/BatchScripts/GrowlNotifyLib.scpt" -- Set the path to the GrowlNotifyLib.scpt.
---------- Batch Script ----------
try
tell application "FairMount" to launch
delay 20
countDisks()
copyDisks()
tell application "FairMount" to quit
end try
---------- Sub-routines ----------
on countDisks()
try
tell application "System Events" to set DVDs to name of disks whose capacity is less than 8.589934592E+9 and capacity is greater than 0
set diskCount to count of DVDs
set dvd1Src to quoted form of (POSIX path of item 1 of DVDs)
set dvd1copy to escapePath(outputPath1 & "/" & item 1 of DVDs)
set dvd2src to quoted form of (POSIX path of item 2 of DVDs)
set dvd2copy to escapePath(outputPath2 & "/" & item 2 of DVDs)
end try
end countDisks
on escapePath(outputPath)
set the search_string to " "
set the replacement_string to "\\ "
set AppleScript's text item delimiters to the " "
set the text_item_list to every text item of the outputPath
set AppleScript's text item delimiters to the replacement_string
set the new_item_name to the text_item_list as string
set AppleScript's text item delimiters to ""
set the outputPath to new_item_name
end escapePath
on copyDisks()
if diskCount is less than 2 then
mkDir(outputPath1)
do shell script "ditto " & dvd1Src & " " & dvd1copy
cleanUp(dvd1Src, dvd1copy)
else
mkDir(outputPath1)
mkDir(outputPath2)
do shell script "ditto " & dvd1Src & " " & dvd1copy & " &> /dev/null & " & "ditto " & dvd2src & " " & dvd2copy
cleanUp(dvd1Src, dvd1copy)
cleanUp(dvd2src, dvd2copy)
end if
end copyDisks
on mkDir(outputPath)
do shell script "mkdir -p " & escapePath(outputPath)
end mkDir
on cleanUp(dvd, dvdcopy)
try
do shell script "chmod -R 755 " & dvdcopy
if ejectDisk is yes then do shell script "diskutil eject " & dvd
end try
end cleanUp
---------- End Script ----------