0

How to open iMovie with alt from keyboard with AppleScript?

  • Please be clearer: what are you hoping to accomplish? What does iMovie do when opened while the alt key is held down? – Daniel Griscom Jul 3 '15 at 0:11
  • The dialog for choosing an iMovie-Library. – user121028 Jul 3 '15 at 6:39
1

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
| improve this answer | |
-1

--here's an applescript to copy/paste that might work (unless I misunderstood the question...)

display dialog "would you like to open imovie?" tell application "finder" open "imovie" end tell --p.s. I havn't tested this, so i'm not sure whether it will work

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .