AppleScript in iPhoto or QuickPlayer

Hi there,
I am trying to rotate videos in iPhoto (why it is not possible is beyond me...) and found the following suggestion in the iPhoto forum:
" Use the AppleScript given on the following MacOSXHints thread:
" http://forums.macosxhints.com/showthread.php?t=13163&highlight=rotate+video
however I am at a complete loss as to what I am supposed to do with the info.
Thanks in advance.
Message was edited by: arkadian
Message was edited by: arkadian

Hi there,
thanks for the advice... It does seem more hassle than it's worth... Got QT P 7 and I have done the following: compiled the script, press run, choose a video and then try to rotate, but I get an error 1719.
Can someone have a look? No way I can do it straight from iPhoto or after I have chosen the video? It does seem more hassle than it is worth...
set originalMovie to choose file with prompt "Select a movie to rotate:"
display dialog "Rotate clockwise or counter-clockwise?" buttons {"Clockwise", "Counter-Clockwise"}
set turnChoice to button returned of the result
set saveRef to choose file name with prompt "Save a new copy of the movie here:"
tell application "QuickTime Player 7"
activate
open originalMovie
tell movie 1
if turnChoice = "Clockwise" then
rotate right (the first track whose kind is "video")
else
rotate left (the first track whose kind is "video")
end if
save in saveRef as self contained
end tell
end tell
Message was edited by: arkadian

Similar Messages

  • Applescript and iPhoto

    I have an Applescript that will take the photos I've scanned in and imported to iPhoto and extract the date and time for the photo from the JPG filename, and put that info in the iPhoto date and time field. I have just learned that the "Batch Change" feature will change the EXIF date for a photo to match the iPhoto date.
    Does anyone know of an Applescript solution that will do this (take the iPhoto date and use Batch Change to set the EXIF date)?

    Hi Steven,
    I don't know why the script doesn't work properly on your computer. Of course, GUI scripting is far from being foolproof. Maybe some of your preferences are not the same as mine. Maybe a few “delay” statements would be required at some places. Maybe a few other adjustments would be needed. I really don't know.
    To test the script, you could first use the “Adjust Date and Time…” item of the “Photos” menu to manually change the date of a few photos of your photo album. Then select these photos and launch the script. The EXIF date of the original photo should be changed accordingly, exactly as you are asking for, and also as can be verified for example by opening the original photo in Preview.app.
    It is very important to understand that the script calls the “changeDate” handler twice for each selected photo, the first time just in order to activate the "Adjust" button (by temporarily replacing the date assigned to the photo in iPhoto by the current date), the second time to replace the EXIF date of the original photo by the date assigned to the photo in iPhoto.
    Sorry not being able to solve the issue.
    Message was edited by: Pierre L.

  • Apple Configurator Issues (ios7, passcode, iphoto)

    Hi
    I'm currently working through a series of issues updating a cart of iPads to iOS7 which are connected to a mac mini running Apple Configurator. Below are the issues i am having if anyone can help with them please. If i fix them i'll add to this to help anyone else with the same problems....
    Just to mention the Mac, iTunes and AC are all up to date.
    There's 32 iPads, on around half of them some of the kids have already updated the iOS over the wireless which means some of the apps now don't work until they are updated to new versions via AC.
    Problems so far:
    1. When the new versions of apps were imported into AC they were all showing as free inc paid apps so the codes couldn't be assigned. FIX: Delete the apps from AC first before you re-import them
    2. Since the latest updates when the cart is plugged into the Mac iPhoto launches to view the photos on them and i get 30+ boxes telling me "Photos in camera roll of iPad 'name' cannot be imported because the device is locked with a passcode. You must unlock the device to import them" A suggested fix is to open Image Capture and set it to not launch any app when the ipads are connected but it doesn't make a difference iPhoto still opens and this message appears every time.
    3. When I plugged one iPad into the mac directly with a usb it updated to iOS7 ok, but when i plugged the trolley in none of them would check in to AC and i got 30+ boxes saying "Apple Configurator could not connect to this device" The problem seems to be that the iPads have a passcode on them...
    For the iPads still on iOS6 if the passcode is entered and then plugged in (either via usb directly or in the trolley) it then appears in AC ok. Having a passcode on them didn't stop them checking in before the update?.
    For the iPads that have been updated over the wireless (now on iOS7), the problem seems to be when the passcode is entered and then connected a message appears on ipad screen saying "Trust This Computer?"
    This is a new message? It's annoying as the cable in the trolley isn't long enough to work on the ipad while plugged and it will be a pain to have to plug them in to usb one by one to turn passcodes off and click this message.
    4. Another issue with passcodes is once updated, the user is prompted to enter a passcode as it does but each time the iPad is refreshed it wipes the passcode and prompts for it to be set again.
    If anyone has come across these issues and has a fix please comment

    but it doesn't make a difference iPhoto still opens and this message appears every time.
    Begin hacking---
    Take a hammer to iPhoto.
    -- Rename the app. You can still run the app by using the new name.
    -- If this doesn't work, move iPhoto to a flash drive.
    -- The Unix name for the iphoto app is buried in the application bundle.  Rename the unix name. Ask for details.
    -- Could write an applescript called iPhoto that returns a good result.  Might be able to cobble this up.  Request.
    Don't know if this will give you other toubles or not.
    ---end hacking
    Robert

  • Mail from iphoto

    When i send a pic from iphoto it auto selects Mail however I would like to send it with my alt mail server Thunderbird. How do I set up Thunderbird as my default mail server?

    roccotaz:
    Welcome to the Apple Discussions. Thunderbird is not supported because Thunderbird does not support Applescript which iPhoto uses for emailing. See the link in my post here: Re: Using Thunderbird as email client in iPhoto
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • How do I 'commit' a value in a text field with GUI scripting?

    I have a script to change the dates of a "Roll" in iPhoto. I can insert the text into the proper field, but it doesn't 'stick'. When I click on another item, the text field returns to the old date. If I click on the text field before I run the script, then a Tab or Return from the keyboard will set the field properly.
    Do I need to programatically set the 'focus' on the field first? Without setting the focus first, a "keystroke return" is caught by the top window and either beeps or opens a photo for edit (as one might expect).
    tell text field 2
    set value to rDate -rDate is a string "4/30/06"
    keystroke return
    end tell

    Thanks for the reply. Backstory: My iPhoto library got corrupted, so I created a new one and dragged in the old Library. The Rolls all have the date the new rolls (directories) were created; all the same in this case. Sorting the rolls by date is thus nonsensical. The AppleScript for iPhoto doesn't handle what I want to accomplish, but the UI scripting might help me out.
    When the whole Library is picked, you can 'view' by "Film Rolls" and the date appears in the bar above each roll of photos. You can change the date in the "Information" area available at the lower left. (The same area you change the title of the rolls or photos, too.) I want to change the roll dates to match the photos' dates.
    So I fired up UI scripting and figured out that I can fetch the date range of the photos in a roll and then set a date for the roll. I can see the date change in the text field, but it doesn't 'stick'. Only if the field has been clicked on prior to running the script, can I "keystroke return" to 'enter' the field. Otherwise I'm looking for suggestions.
    Slightly off topic: The whole right side of the iPhoto screen is a big black hole for UI events. You can't tell anything about it with the UI Element Inspector. I can't automagically 'pick' anything in there, so I can't 'select' the rolls from a script. I'll settle for clicking on a roll and then running a script to correct its date.
    Here's the whole script, without a bit that verifies that the 'assistive devices' box has been checked in the Universal Access pref.
    tell application "iPhoto"
    activate
    end tell
    tell application "System Events"
    tell process "iPhoto"
    activate
    tell window "iPhoto - rebuilt Library"
    tell group 1
    tell splitter group 1
    tell splitter group 1
    tell static text 5 --either 'from' or 'date'
    set theLabel to value
    end tell
    if theLabel is "date" then
    tell static text 6
    set rDate to value
    end tell
    else --get date from 'to' field
    tell static text 8
    set rDate to value
    end tell
    end if
    tell text field 2 --roll's date
    set value to rDate
    keystroke return --might not work
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell

  • Applescript to add open images in Preview into iPhoto?

    I've got an eyefi card in my digital camera that sends my pics directly to a folder on my laptop in which a folder action runs that automatically opens the image in preview. What I'd like to do next is to close the images I don't want, and then run an applescript that will take the remaining open images in Preview and import them into iPhoto.
    I guess if I were to do it manually, I would drag the proxy icon of each window into iPhoto? But that would create several separate events in iPhoto since it would import them one at a time. It would be ideal if there was a way for Applescript to locate the open images in finder, and then import all of those images into iPhoto all at once. Is this possible? If so, any tips on how to get started with that? I'm a newb to Applescript, so be gentle.

    It sounds like you've been doing the search in the menubar Spotlight field. If so, here are two things to try:
    One, when you have located the image you think you want to open, hit Command-Return, which will open (in a new Finder window) the folder in which the image file is located, even if it is inside your iPhoto library. The default application for opening the image then should be Preview (it is for me).
    Two, select "Show All" at the top of the results, which opens a Finder search window. An image file in the resulting list, even if it is inside the iPhoto package, will open by default in Preview (That's what it does for me.)
    Hope this helps.

  • Applescript  to launch and run an iPhoto Slideshow - needed

    How do I make an applescript that will launch and run an iphoto Slideshow for
    my dementia Mama.
    She can read email, but iPhoto is too much for her.
    Also, can iPhoto slideshows play just a specified album
    Thanks!

    Welcome to this forum.
    The following script should launch a slideshow from the choosen iPhoto album, using the predefined slideshow settings. Just press the Escape key to end the slideshow.
    *tell application "iPhoto"*
    activate
    *set R to choose from list (get name of albums 9 through -1) with prompt "Please choose an album:"*
    *if R is false then return* -- user canceled
    *set theAlbum to (album 1 whose name is item 1 of R)*
    *select theAlbum*
    *select photo 1 of theAlbum*
    *start slideshow*
    *end tell*
    Hope it can help.

  • Use Automator/AppleScript to clean iPhoto Library

    Hello,
    Having read a lot of posts about the use of AppleScript and Automator to do things with iPhoto, I think it's possible to create a script or a processus to clean the iPhoto Library (let say, a copy of it) to eliminate "zombie files" (photos which have not been deleted of the iPhoto Library when emptying the iPhoto trash).
    The script should simply verify, for each file in the "master" folder, il the path of this file is known in the iPhoto database (the data base is in the "AlbumData.xml" file). If it is, the file is kept. It it's not, the file is moved to trash (or to a temporary folder).
    Should anyone create this script ? I should try, but I would need two weeks to do it correctly, and I'm sure someone can do it in 5 minutes... Some help here ? Thanks !

    Hi,
    Try this AppleScript:
    repeat
        set r to (choose file with prompt "Select an iPhoto Library package" default location (path to pictures folder)) as string
        try
            (r & "AlbumData.xml") as alias
            (r & "Masters") as alias
            (r & "Previews") as alias
            exit repeat
        on error
            activate
            display dialog "This package does not contains \"AlbumData.xml\" file or the \"Masters\" folder or the \"Previews\" folder." buttons {"OK"} default button "OK"
        end try
    end repeat
    set iPhoto_Library to quoted form of POSIX path of r
    set AlbDataXML to quoted form of POSIX path of (r & "AlbumData.xml")
    tell application "Finder"
        set newFolder to (make new folder) as string
        set dest to (make new folder at folder newFolder with properties {name:"Images qui ne sont pas dans AlbumDataXML"}) as string
    end tell
    set destF to quoted form of POSIX path of dest
    set file1 to quoted form of POSIX path of (newFolder & "filesPath.txt")
    set file2 to quoted form of POSIX path of (newFolder & "PhotosDataPath.txt")
    do shell script "dest=" & destF & "; tFile=" & file1 & "; tFile2=" & file2 & "; iPhotoLib=" & iPhoto_Library & ";
    grep -A1 '\\(\\<key>OriginalPath<\\|\\<key>ImagePath<\\)' " & AlbDataXML & "  | sed -n  '/<string>/s/^.*<string>\\(.*\\)<\\/string>$/\\1/p' | sort -o \"$tFile2\"
    find \"$iPhotoLib\"Masters -type f \\! -name '.*' >\"$tFile\"
    find \"$iPhotoLib\"Previews -type f \\! -name '.*' >>\"$tFile\"
    sort -o \"$tFile\" \"$tFile\"
    diff -ab  \"$tFile2\" \"$tFile\" | sed -n '/> /s/^> //p' | while read f; do
       name=${f##*/}
       if [ -e \"$dest$name\" ];then
            i=1
            while [ -e \"$dest$name $i\" ];do
                ((i++))
            done
            name=\"$name $i\"
       fi
       /bin/mv -f \"$f\" \"$dest$name\"
    done"
    tell application "Finder"
        activate
        reveal folder dest -- select the folder which contains moved files
    end tell
    This script move every files in the ("Masters" and "Previews") folders which it's path is not in the "AlbumData.xml" file to a new folder on the desktop.
    The grep command get all path in "AlbumData.xml" from the (OriginalPath and ImagePath) keys and put the result in file2.
    The find command get all file's path in the ("Masters" and "Previews") folders and put the result in file1.
    The diff and sed command get all file path in text file1 which is not in text file2
    Before moving file:
    This script check name of the file to not overwrite any file in the destination folder.
    If a name already exist in the destination folder, the script add a space and a number to the end of the filename.

  • IPhoto Choose Photo AppleScript

    There has to be a simple answer to this question, but I can't find it anywhere.
    When writing AppleScripts for the Finder, there is a "choose file" command which opens a file select dialog.
    I'm trying to write a script for iPhoto, but I can't find an equivalent command to open the iPhoto photo select dialog. Is there one?
    Thanks in advance for your help!

    I knew it would be a simple answer!
    I'm working on an export script for iPhoto that will eventually do a bunch of things, but at this stage I'm just playing around with manipulating some of the data like titles, comments etc., and I was just trying to make it all work from within AppleScript.
    I also tried Automator, trying to pass the selected photos from the "Ask For Photos" dialog to an AppleScript. I tried creating an application that does nothing but "Ask For Photos" and then using that in a script, too. In both cases, the script refused to manipulate (or even just display) any of the titles, comments, dates or anything else from the chosen photos.
    Everything I've tried to do with photos I've manually selected in iPhoto has worked, so I'll just have to do it that way. It's no big deal, I just wanted to see if I could do it this other way.
    Thanks for your quick answer!

  • AppleScript to force iPhoto catalog save?

    I had my first joyous experience with iPhoto 5.x flakiness last night. I'd done about a half hour of edits, then tried to email some images. The system hung and after 15 minutes of the spinning pizza of death I killed iPhoto.
    To my surprise, I discovered I'd lost all my edits. The images were there, but not the edits. iPhoto 2-4 were all bad in their own evil ways, but none of them did that to me. What a great "feature".
    I've discovered via Google that this is a common complaint. iPhoto 5 only saves the catalog on exit. If anything happens prior to that the work is lost (I wonder if this accounts for some lost images).
    Bad design. Clearly iPhoto needs an autosave preference and/or a save command. In the meantime, does anyone know of an AppleScript that would save the catalog? Alternatively an automator function that quits and restarts iPhoto.
    The last application that combined equal parts of sheer rotteness with elegance was a 1980s classic app called something like "FullWrite Professional". Darned aggravating.

    IPhoto Library Manager displays a 'relaunch' iPhoto button when iPhoto is running. I use this to force a save and restart, so I don't lose my work when iPhoto craters.

  • Applescript for sorting faces in iphoto

    Hi,
    I would really like for the Faces pane in iPhoto to sort the faces based on how many photos there are of that person, i.e., the person with the most photos would be first in the list, the person with the second most photos would be second, and so on. I feel sure that it is possible to write an applescript that would do this, but I have almost no experience with applescript. I have 688 faces, so sorting alphabetically mixes my loved ones in with people that have very few photos, while sorting manually is tedious and needs constant updating.
    So my questions are: 1. Is it possible to do make iPhoto sort in the way I want, either with an applescript or by some other method? and 2. if it is possible, how do I find someone who can write the script for me?
    Thanks so much!
    Jennifer

    A script won't help because you cannot arbitrarily set how the faces are displayed, you only get what the menus allow. You need to ask Apple to add this function:
    http://www.apple.com/feedback/iphoto.html

  • When using photos from the "Media" option in Applescripts and other apps, it takes a LONG time to load the photos from iPhoto...

    It also happens when using the Media option in programs like iMovie. Has anyone found a solution for this problem?

    That is long...
    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?
    If it is...
    Create a new account (systempreferences -> accounts or Users & Groups on 10.7 and 10.8), make a new Library in that account, import some shots  and see if the problem is repeated there.
    Regards
    TD

  • IPhoto 08  & AppleScript - support for set rating?

    I am considering upgrading iPhot from 06 to 08..
    So I don't have 08.
    Can anyone confirm whether or not the AppleScript support has been improved to allow for setting the Rating of photos via AppleScript?
    Thanks!
    Steve

    Steve:
    Still no rating support via AS. I cannot find anything new in the AS dictionary since the latest edition. Perhaps with Leopard???

  • Applescript to export single iPhoto album

    I'm looking for a script that will allow me to export a single iPhoto album. I'd like to be able to automate it (eg. once daily). The name of the album never changes, but the content will.
    I've found a few starting points, but nothing I've been able to wrap my head around. Most seem to require an actual input as opposed to a defined album.
    Any help?
    yeti

    Depending of what you mean by “exporting an album”, the following script might do what you are asking for.
    set theDestinationFolder to POSIX file "/Users/user name/some folder" as alias
    tell application "iPhoto"
        set theImagePaths to image path of photos of album "My Super Awesome Album"
    end tell
    repeat with thisPath in theImagePaths
        set thisFile to POSIX file thisPath as alias
        tell application "Finder" to duplicate thisFile to theDestinationFolder with replacing
    end repeat
    Message was edited by: Pierre L. (no need to select the album)

  • APPLESCRIPT ERROR 10827-3RD PARTY BRATTOO-W/IPHOTO

    AM USING A 3RD PARTY APP BY BRATTOO---THUMBNAIL ERADICATOR AND DUPLICATE ANNIHLATOR-ALL WAS WORKING FINE UPTIL A FEW DAYS AGO-NOW WHEN I OPEN THE APP TO USE I get a applescript error-10827 and I can't use the app. Brattoo says its a very strange error message and basically don't know what to do. I put my snow leopard disc in and used the disc utility to repair sys. that seemed to work for a while, but this am. I am back to the same problem.I trashed prefs on the app and on i-photo.
    any ideas out there????
    Dickster------------

    I didn't actually read your message after I saw that you were using a capitals.
    Now after reading this time I would suggest that you send use the strange error message.
    While it might seem strange to your eye, it just might be meaningful to someone here.
    Allan

Maybe you are looking for

  • Trojan found in Lion and on iPhone 4 backup

    I recently installed MacKeeper on my Mac and Pc's I have been having major issues with Lion - see my discussion  there - But tonight it found a Trojan in my Users/dr/App Support/MobileSync/Backup file  - This was as I was restoring my iphone 4 from t

  • Programmat​ic change in multicolum​n listbox value ignored by internal key event handler

    The attached LabVIEW 8.5 vi demonstrates a problem I noticed using multicolumn listboxes.  Upon changing the value (selected row) of the listbox programmatically, the very next press of the up or down arrow key behaves as if the value was never chang

  • Ipod Touch message "itunes can neither read nor write to "my Name" disk.

    While syncing my Touch on I- Tunes, everything stopped and the message was "can neither read or write to B-----J-----"s ipod disk. I was on the phone for hours with Apple support, sent the Touch back twice to no avail. Finally found a newly acquired

  • Error in E-mail Notification in BPM

    Hi folks,   I have create one Simple BPM Project in which i Created one Notification Activity to send the mail   but when i am starting my BPM Project it is showing the below error in history : Notification could not be sent to the following recipien

  • Sony Ericsson server is overloaded

    Please help I heard that u can fix lag on ICS if you repair your phone but I cant repair cuz it says Sony Ericsson is overloaded... I try to repair my phone everyday but anytime I repair it says the same SH!T!!! I wasnt even able to update my phone v