Using Automator/Applescript with Keynote?

For a series of presentations I'm creating, on practically every slide, I have to delete a picture, then paste the replacement on the slide, resize that item, and reposition it on the slide (at the same location).
This seemed like a perfect use for Automator, and I recorded my steps in Automator, but I ran into a couple of questions after that.
1) When I'm in Keynote, I don't see a command to run a script.
2) I'm looking at the automation that was created, and the workflow includes "Type 600 px into the text field." But I'm concerned that I don't see anywhere in the workflow that specifies what property is being edited at that point.
Chuck

Thanks chuck,
I never thought to use Automator before but may give it a try now.
I'm pretty new to AS so don't quote me, I know some apps have a File Menu command to run scripts but in general *** are run from the script menu on RHS of Menubar, perhaps you need to activate a pref for that I can'r remeber how I got mine there. Applescripts can be run with Keynote but have limited use. It seems to me there is no property dictionary for Keynote items.
But i did find this snippet in somebody's applescript suggesting interaction via keyboard shortcuts is possible. Also controlling the slideshow is definitely support by the application dictionary.
tell application “Keynote“
  activate
end tell
tell application “System Events“
  tell process “Keynote“
    keystroke “v“ using {command down}
  end tell
end tell
http://piyocast.com/as/archives/537

Similar Messages

  • I want to use applescript with keynote

    I recently purchased Keynote specifically because there is an applescript that purports to run a Keynote presentation and use text to speech to provide narration from the notes on each slide.  I found the script and some supporting materials on http://www.macosxautomation.com/applescript/selfpreso/index.html.  However, this was produced a few years ago and a few versions of applescript and Keynote ago.  So, I need to accomplish the same feat with the current versions of these products.
    But I'm having a great deal of difficulty finding references that tell me much about using applescript with Keynote.
    Can anyone help me out with this?

    If you create an account for him you can setup Parental Controls.
    iTunes: Using Parental Controls
    Create a new Apple ID here.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/21/wo/mz0CVVrDn8QtH1s 3uYclhM/10.0.31.145.6.3

  • 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.

  • Using automator/applescript to do terminal commands/ssh

    hi,
    pardon my extreme novice question here, but i was looking for quick & easy ways to create a small applet to basically run a script on a web server to remotely check & update it's IP address with its web host, and also serve internet services to a wifi access point.
    here's the basic stuff we usually do in terminal —
    my-Computer:~ admin-user$ ssh admin@+{web server IP, ex.: 0.0.0.0}+
    +{we then have to wait for it to connect and ask for a password}+
    Password: {our input for password}
    Last login: Sat Jun 14 15:04:58 2008 from 0.0.0.10
    Welcome to Darwin! +{so we are now connected}+
    www:~ webserver-admin$ sudo /var/root/IP_update.sh
    +{there is then a long output as that script runs and updates the IP with the web host}+
    www:~ webserver-admin$ sudo route add -net 0.0.0.0/24 0.0.0.3 +{serve up internet services to a wifi access point, returns output that it was done, failed or already connected}+
    www:~ webserver-admin$ sudo /opt/local/sbin/lighttpd -f /opt/local/etc/lighttpd/lighttpd.conf & +{starts up our web server, returns that it was started or already on because port 80 is in use}+
    so that's what i want it to do. i thought using automator and the *run shell script* option in it would work, but i can't even get past the first ssh command without an error. i have it set to use /bin/sh, and have tried it with *pass input* setting set either way, *to stdin* or as arguments, but in either case, just on this first line alone, i get the following error —
    Run shell script failed
    Pseudo-terminal will not be allocated because stdin in not a terminal.
    does anyone know why this is happening? how do i get around this and proceed on with my script using automator?
    also, if anyone could please give tips about how to use the "pause" to have it wait for prompts over the network (like the "Password:" prompt coming back after an indeterminate number of seconds) and which automator command might be used to pop up a dialogue for user input (like asking for the password), it would be much appreciated. thanx.

    You'd want the *do shell script* command in AppleScript for this
    http://developer.apple.com/technotes/tn2002/tn2065.html
    however you're not going to be able to use it as you would tools such as Expect which allow you to wait and provide additional input on stdin. If all you're doing is updating an IP address why not simplify the entire mess with BIND's dynamic updates?

  • Using RSS feeds with keynote

    Does anyone have an idea how to use RSS feeds within keynote? I don't believe there is any embedded function, but hopefully there is a workaround. Could you download the RSS feed, then somehow reference the text in keynote? Any ideas?

    Welcome Wolf12358
    Easy to do this in Quartz Composer a free developer tool for visual programming. Other route is if you have Keynote08 you can make a hyperlink to a webpage. Save the slide and open in Keynote09 in which this function has been depreciated for whatever reason. Not sure if the RSS feeds will render but give it a try. If you don't have KN08 but can post the URL somebody will make it and post it for you to dl.

  • Applescript with Keynote

    I'm trying to write an Applescript to export the images from a Keynote presentation using Keynote 6.0, which has now added that option. I can export a movie, a PDF, and every other type of format except for an image. Here's what I'm doing and it doesn't do anything, doesn't even give an error. Any suggestions?
    tell application "Keynote"
         export front document to file "HD:Exported" as image with properties {compression factor:0.9, image format:PNG, export style:IndividualSlides, skipped slides:false, all stages:true }
    end tell

    If "HD:Exported" is intended to be a folder called Exported at the root of the disk you are booted into it should be: "/Exported".
    It is usually better to put such things in User files or Desktops.

  • "batch" exporting to aiff using automator / applescript?

    I often find myself prepping a lot of audio for DV editing in Final Cut Pro....exporting audio out of QT to 48khz, 16bit, aiff.
    I'm looking for a way to do this to many files in 1 step....ie: drag and drop a folder/files onto an icon. Automator doesn't seem to have an export action under quicktime. And all i can do in applescript is tinker, at best.
    I downloaded the QT script package from the apple site.. http://www.apple.com/applescript/quicktime/ these seem like a good start, but im havin trouble tweakin them for .aiff audio
    any suggestions for doing this?

    can do this now with automator

  • Using a projector with KeyNote/PowerPoint

    How can I blank the output to the projector so I can work on the laptop to set up the next presentation for subsequent speakers? Easy on Windows (Fn F4 typically), can't see any way to do it with my Mac!

    lynnej46 wrote:
    When using PowerPoint or Keynote with a projector (e.g., giving a presentation), the laptop display is blurry, although the projected image is clear.
    I had that only once after updating to 10.6.8.
    First Aid:
    Connect projector before starting Keynote.
    Set in System Settings - Displays - Arrangement different (matching) resolutions for projector and your display and look that "clone" is not checked.
    Eventually uncheck "Automatically arrange brightness..." during presentation.
    Cheers - Lupunus
    PS ... After a major update (as 10.6.8 is) you are recommended to perform a permissions repair with the Disk Utility. Don't bother about upcoming warnings during that run, the ocour mostly as the repair is performed on a running system and opened files could not by touched by the tool.

  • Using three monitors with keynotes?

    I have three monitors on my mac book and want to use the presenter view on two of the monitors and the show on the third.  Is there an app or patch I can use to do this?

    Thanks very much, perfect!
    Only thing is you don't need to press the "?" button. But it seems a little temperamental when you option + click + drag. I found you to have to deselect but clicking anywhere in the window and reselected the window you wish to mirror (which I assume press the "?" does the same thing).
    I never thought it was going to be this simple, I was sure I would need to install a third party app or something.
    Thanks again!!!!!!!

  • Automator or Applescript using png files with alpha channel

    I have hundred of png files with alpha channel.
    I want to suppress alpha channel.
    How can i do it using Automator or Applescript ?
    Thank you very much.

    You can use the free command line image processing tool ImageMagick in your Applescripts or Automator workflows, as well as from a Terminal shell.
    You can download ImageMagick from http://www.imagemagick.org, but Cactuslab has simplified installation by putting together an installer package. It’s available at  http://cactuslab.com/imagemagick/. Download the package and double-click on it. Follow the instructions to install. It will install ImageMagick into /opt/ImageMagick and add it to your $PATH by creating a file in /etc/paths.d/. Restart your computer for the changes to take effect.
    The two ImageMagick commands we’re concerned with are “convert” and “mogrify”. Convert is more efficient for multiple and piped operations on the same image file, and mogrify is more efficient for batch processing. Generally speaking, convert will output a file separate from the input file. Unless a path is specified, mogrify will overwrite the input file with the output file. An important distinction.
    You can perform various operations on the alpha channel using arguments after either the convert or mogrify command. Two of the available arguments are:
    -alpha off - Disables the image's transparency channel. Does not delete or change the existing data, just turns off the use of that data.
    -alpha remove - Composite the image over the background color.
    Also of use are the -flatten and -background options:
    -flatten - overlay all the image layers into a final image and may be used to underlay an opaque color to remove transparency from an image.
    -background - sets the background color.
    Start off using the convert command with a single image to see the effect and adjust to your liking. Once you’ve achieved the desired outcome, then use the mogrify command to batch process the chosen images.
    Before getting into how to use Automator or Applescript in your workflow, use Terminal and the command line to see the effect on a single image. Copy one image to your ~/Desktop. In Terminal change the directory to ~/Desktop by typing the following command and pressing the Enter key:
    cd ~/Desktop
    Then choose the option you are looking for, -alpha remove for instance, type the following command and press the Enter key:
    convert input-photo.png -alpha remove output-photo.png
    You can check the alpha channel (transparency) and background in the Preview app, go View > Show Image Background from the menu bar.
    Once you’re ready to batch proces, place all the photos you want to convert with the same command into one folder. Copy the folder to your ~/Desktop. Let’s assume you’ve labeled the folder “InPhotos”. It’s prudent to manipulate copies in case something goes amiss. In that event you can copy the folder with the originals again and start over. Create a new empty folder on your ~/Desktop and call it “OutPhotos”. Let’s also assume your home directory is called “Me”. The following command will process the photos from the InPhotos folder and put them in the OutPhotos folder:
    mogrify -alpha remove -path /Users/me/Desktop/OutPhotos/ /Users/me/Desktop/InPhotos/*png
    According to Apple Technical Note TN2065:
    "when you use just a command name instead of a complete path, the shell uses a list of directories (known as your PATH) to try and find the complete path to the command. For security and portability reasons, do shell script ignores the configuration files that an interactive shell would read"
    So, you need to use the full path to to ImageMagick commands, unlike in the shell where you can just use the command name.
    To batch process using Automator, use the “Run Shell Script” action (note: retain the single space at the beginning of the last line):
    /opt/ImageMagick/bin/mogrify \
    -alpha remove \
    -path /Users/Me/Desktop/OutPhotos/ \
    /Users/Me/Desktop/InPhotos/*png
    To batch process using Script Editor (Applescript), use the “do shell script” command:
    do shell script "/opt/ImageMagick/bin/mogrify -alpha remove -path /Users/pd/Desktop/OutPhotos/ /Users/pd/Desktop/InPhotos/*png"
    Further info on ImageMagick:
    http://www.imagemagick.org/script/command-line-options.php#alpha
    http://www.imagemagick.org/Usage/masking/#remove
    http://www.imagemagick.org/index.php
    http://www.imagemagick.org/script/command-line-tools.php
    http://www.imagemagick.org/script/command-line-options.php
    Examples:
    The original PNG image:
    -alpha off:
    -alpha remove:
    -background black -flatten:
    -background blue -flatten:
    -channel alpha -evaluate Divide 2:
    -channel alpha -evaluate Divide 2 -background black -flatten:

  • I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    Hi
    In iMovie'11 (version 9.0.x)
    on top menu row - Apple/iMovie/File/Edit/Cut (Can vary dep. on language - in Swedish Apple/iMovie/Arkiv/Redigera/Klipp . . . )
    down Cut menu - Slow playback/Raspid Playback/Re-play in Slow Motion and onvards
    Here one can select the Pre-Set speeds
    Are you familiar with getting 'inspector' to run?
    No - but I guess that Double Click on clip/sequense or ctrl-Click on it might open it.
    Yours Bengt W

  • Using Automator to open a program with a delay after a programmed restart

    Hi to all! With my old PowerPc I used to start unattended sessions of my Newsreader (Unison) overnight simply putting Unison in my Login elements window, and programming a restart at a fixed hour. Unfortunately, with my very fast new iMac this doesn't work: Unison opens too fast after the programmed restart, before a network connection has been established, and Unison is unable to see the NewsServer online when it starts (error "nodelist not found", typical of a not yet established Internet connection). Note that I downgrade to Unison 1.8.x to do this, as the Unison 2.x program cannot be closed with a session running to resume it after start: it simply defaults to "Pause transfers" after quitting, and need a clic on "Resume" after reopening.
    Obviously, what I need is to introduce a "wait (say) 2 minutes before the opening of Unison", or anything that can check the Internet connection before Unison starts. May anyone instruct me to do this with Automator and/or AppleScript?
    In fact, I tried to generate a workflow in Automator, with a Pause after the start of the process, then the instruction to open Unison. I put the saved workflow in my Login elements, but it didn't work on my iMac 27, i7Core, Snow Leopard installed. I added an "execute workflow" at beginning of the process, but the Pause command gives always an error and the process stops before Unison' opening.
    Any suggestion or help in writing an Automator or AppleScript workflow/script to be put among the startup items?
    Thanks a lot!

    I am trying to use Automator to restart an application. I figured how to quit the application, however when I relaunch it, it asks for password permission... how can I use automator to enter the password? or is there a way to launch the software with password in a script?

  • Using Automator with Disk Utility

    I'm new to using Automator. I want to create a work flow with Disk Utility but is doesnt appear in the applications list. How do I make Disk Utility work with Automator?

    If a program doesn't appear in the list, that means that Apple hasn't written actions for it yet.
    You can still use Automator with Disk Utillity, but you will need to use Applescript and the 'Run Applesript' action to operate Disk Utillity.
    Unfortuately the 'how' is beyond my knowledge, and the scope of this post.

  • Can i use automator with photoshop?

    I want to open a Keynote or PPT file select an image, open it in photoshop make the background transparent then save it back in Keynote. is this possible?

    Yes you can use automator with photoshop:
    You might wanna take a look at http://www.automatorworld.com/archives/photoshop-cs-automator-actions/
    But not sure if it does what you are asking for.

  • Using applescript with iCal

    I have been using an applescript to create a unique combo of new events over the course of a school year for multiple people. I run the script to make a new events in an untitled calendar, export the calendar and then create a new untitled calendar and run it again. 60 or so different times, all with unique combos. I've posted this question to the Applescript forum with no replies, and thought I'd try here. My issue is that when iCal starts to make new events it begins at somewhat arbitrary dates, cycles through the whole year correctly, but jumps around in such a way that it seems to really bog the script down. Now maybe it is a script issue, although this script has worked correctly in the past. Maybe it is a permissions/cache issue (I've run Onyx and it helps with the speed). Currently it is starting to make new events on the 26th of Oct when the year foes from sept 7,2010 to June 7 2011. I'm convinced that I can get that 26th of Oct to change by trashing the cache or something (I'll work on that), a simple restart does not influence it. The script in the end does work, so maybe I'm troubleshooting something that is minor, but I'd love to know the answer! Thanks for the help.
    dan

    So I ran the automation tab of Onyx to repair permissions, execute maintenance scripts, clean the cache... and now when the applescript runs it makes the first new event on a different date than Oct 26...(don't quite remember right now what it is). The question is what is controlling this...??? ARGH
    dan

Maybe you are looking for