Cómo abrir iMovie con alt
desde el teclado con AppleScript?
Respuestas
¿Demasiados anuncios?
Kevin Grabher
Puntos
2556
Aquí hay un script por maeks84 que hace lo mismo para iPhoto que podría ayudarle a lograr lo mismo para iMovie (necesidad de publicar como respuesta debido a la longitud). Código insertado en caso de que alguna vez se caiga..
--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
Mika
Puntos
1