How to open iMovie with alt from keyboard with AppleScript?
Best Answer
Here is a script by maeks84 which does the same for iPhoto that might help you with accomplishing the same for iMovie (need to post as answer due to the length).
Code inserted in case it ever goes down..
--maeks84@gmail.com
--http://maeks84.wordpress.com
property libraryPath : "Macintosh HD:Users:Path:to:iPhoto Library"
--Determine if iPhoto is open and needs to be quit
--Will only bring iPhoto to the front if the correct library is already open
tell application "System Events"
if exists process "iPhoto" then --Only worries about the current user
tell application "iPhoto"
if image path of photo 1 does not contain POSIX path of libraryPath then
activate
beep
display dialog "About to quit iPhoto!" giving up after 300 --Gives a chance to cancel otherwise continues on
quit
tell application "System Events"
repeat while exists process "iPhoto"
delay 3
end repeat
end tell
my launch_library()
else
activate
end if
end tell
else --iPhoto is not currently running
my launch_library()
end if
end tell
on launch_library()
do shell script "defaults write com.apple.iPhoto RootDirectory " & quoted form of POSIX path of libraryPath
tell application "iPhoto" to activate
tell application "System Events"
repeat while (exists process "iPhoto") is false --Delay until iPhoto is launched
delay 5
end repeat
end tell
do shell script "defaults remove com.apple.iPhoto RootDirectory" --Restore the default library
end launch_library
You can't, actually. iMovie '08 and subsequent versions are a completely different program from iMovie HD 6 and previous versions.
However, the last released version of iMovie HD does still run on modern Macs. It used to be a free download for users of iLife '08, but Apple has since removed it (IMHO, to "encourage" power users to upgrade to Final Cut Express, since iMovie '08 was utterly useless if you happened to have been one of the few who knew what they were doing).
It is still possible to download and install iMovie HD through some avenues of questionable legality.
Best Answer
Here is a script by maeks84 which does the same for iPhoto that might help you with accomplishing the same for iMovie (need to post as answer due to the length). Code inserted in case it ever goes down..