Can I control an image position with Scripting?

hello --
i find myself doing a lot of repetitive tasks in keynote, such as creating dozens of slides with an image in a specific position (x-y position). is there a way to automate this using applescript or automator?
so far, i am able to create the empty slides with the images in a specified folder, but they always just get centered. it's a good start, but the next time suck is to position them by hand.
any ideas?
thanks in advance.

Hello,
It's not possible without the help of the GUI Scripting.
This implies that you should not use the mouse or the keyboard during the execution of the script, but it's better than doing it manually on several images.
You must enable the GUI Scripting by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane.
Here is the script : this script create a slide of each image (your selection in the Choose file dialog), and it set the position of the image in each added slide to (40, 60)
---------------------Beginning ot the Script
set tFiles to choose file of type "public.image" with multiple selections allowed
tell application "Keynote"
    activate
    tell front slideshow
        set nSlides to count slides
        make image slides paths tFiles without set titles
        set nSlides2 to count slides
        set firstTime to true
        if nSlides2 > nSlides then repeat with i from (nSlides + 1) to nSlides2
            show slide i
            my setImageposition(40, 60, firstTime) -- set image position to (40, 60)  
            set firstTime to false
        end repeat
    end tell
    display dialog "Done"
end tell
on setImageposition(posX, posY, firstTime)
    tell application "System Events"
        tell process "Keynote"
            if firstTime then (* initialization so that the script works correctly.
                   Show the Inspector window, click on "Metrics" tab.
                   Set the View to "Slide Only" *)
                set frontmost to true
                delay 0.3
                click menu item "Slide Only" of menu "View" of menu bar item "View" of menu bar 1
                set inspectorWindow to missing value
                set tWindows to windows whose subrole is "AXFloatingWindow"
                repeat with i in tWindows
                    if exists radio group 1 of i then
                        set inspectorWindow to i
                        exit repeat
                    end if
                end repeat
                if inspectorWindow is missing value then
                    keystroke "i" using {option down, command down} -- Show Inspector
                    delay 0.2
                end if
                tell window 1 to if name is not "Metrics" then -- size and position
                    click radio button 6 of radio group 1 -- the "Metrics" tab
                    delay 0.2
                end if
            end if -- end initialization
            keystroke "a" using command down -- select image
            perform action "AXRaise" of window 1 -- set the focus to  the Inspector window
            delay 0.1
            tell group 1 of window 1
                set focused of text field "X" to true -- left position
                delay 0.1
                keystroke ("" & posX & tab & posY & tab) -- set image position,
            end tell
        end tell
    end tell
end setImageposition
--------------------- End Script
Important : You must localize the titles (depending on the language used in your system) in these two lines:
click menu item "Slide Only" of menu "View" of menu bar item "View" of menu bar 1
tell window 1 to if name is not "Metrics" then -- size and position

Similar Messages

  • How can I control the image size when I export form iphoto, the choice is too limited, I need to send a photo under 3 MB but if I choose high quaulity it is only 1.1 and i need to keep the best quaulity I can. Thanks for help.

    How can I control the image size when I export form iphoto, the choice is too limited, I need to send a photo under 3 MB but if I choose high quaulity it is only 1.1 and i need to keep the best quaulity I can. Thanks for help.

    Any image can only be as large as the Original. With a program like Photoshop you can UpRes an image and get it to a bigger size, larger files size as well, but the actual quality of the image will be degraded, depending on the UpRes system and the original quality of the image.
    iPhoto is not the program to be doing that in and I don't think it even has that option.
    So I suspect the image you are trying to send isn't much bigger than what you are getting. You can also try Exporting it from iPhoto to yopur desktop and see what size you end up with. If it is still that 209KB +/- file size then that is the size of the original image.

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

  • How can i control my mini mac with my ipad on diferent wifi networks?

    How can i control my mini mac with my ipad on diferent wifi networks?

    Go to my pc, splashtop, team viewer or any of the several remote desktop apps in the store.

  • I plug my computer into my stereo and use the remote app on my iPhone to control it. How can I control my wires iPad with the remote app on my iphone when it is plugged into the stereo? they are different iTunes accounts.

    I plug my computer into my stereo and use the remote app on my iPhone to control it. How can I control my wires iPad with the remote app on my iphone when it is plugged into the stereo? they are different iTunes accounts.

    I think this is probably a sign that your network could be better than it is.
    Intermittent problems are often a result of interference. Interference can be caused by other networks in the neighbourhood or from household electrical items.
    You can download and install iStumbler (NetStumbler for windows users) to help you see which channels are used by neighbouring networks so that you can avoid them, but iStumbler will not see household items.
    Refer to your router manual for instructions on changing your wifi channel or adjusting your multicast rate.
    There are other types of problems that can affect networks, but this is by far the most common, hence worth mentioning first.

  • How can I process Raw Images taken with a Nikon D7000 in PS4  Extended?

    How can I process Raw Images taken with a Nikon D7000 in PSE Extended?

    Hi there
    Unfortunately, CS4 does not support the Nikon D7000. You'll have to download the Adobe DNG converter (links below) to process RAW files from your camera.
    DNG converter 6.3 - Mac
    DNG converter 6.3 - Windows
    Here are some answers to similar questions asked over in the Photoshop General discussion:
    If you need further information on this topic, please feel free to post in the Photoshop General Discussion or in the Camera Raw forum.
    Camera Raw | Supported cameras
    Camera Raw | compatible applications
    Cheers,
    Kendall

  • Mac Pro OSX 10.10 can't control volume in iTunes with keyboard

    I can't control volume in iTunes with keyboard

    Yes nachit, I have the same problem.
    I've noticed that when I switch between the output audio devices (i.e. Built in speaker to headphones), the volume control fails.
    I've already opened a topic yesterday. At this time, no answer.
    We'll wait...

  • HT1555 Can I control my apple tv with an iPad

    Can I control my apple tv with my ipad?

    Yes, but you will need to install the 'Remote' App from Apple from the App Store.

  • Can I control the cursor position

    I'd like to confine the cursors position to a grid when it's within a particular panel. I tried public void mouseMoved(MouseEvent e)
    int x = (int) (GRIDSIZE*java.lang.Math.round(e.getX()/(1.0*GRIDSIZE)));
    int y = (int) (GRIDSIZE*java.lang.Math.round(e.getY()/(1.0*GRIDSIZE)));
    e.translatePoint(x,y);
    } But that didn't work. Can it be done?

    I'm not exactly sure what you want to be done, but, if you want to control the mouse position, you can create a Robot object (check the class in the java docs) and use robot.mouseMove(mouseX,mouseY) where mouseX and mouseY are integers. THIS ONLY WORKS IN APPLICATIONS THOUGH. its too powerful to be able to control a persons mouse, (and keyboard is controllable too with Robot), you can imageine what a person could do lol.. Anyway, you could repeatedly check if the mouse position is on the grid, and if it isn't, use robot.mouseMove, to place it onto the grid.

  • Can i control surface logic 9 with digi 002 mixer? on snow leopard 10.6.8

    Hi I'm trying to connect my digi002 mixer to use it as a control surface with logic 9, is there anyway of doing this?
    I have an RME Hammerfall DSP Multiface II, that I'm using as my main sound card, but would like to light it with the 002 and use the 002 converters as well, so that in total i get 16 channels I/O + if I could get control surface of logic with the 002 would be great.....
    I heard about the Multi-Client CoreAudio Driver, but not 100% sure if and how it works to control surface logic with 002.
    Anyone???
    Help please....
    Thx...
    G

    I assume you have working installer discs? If so here's a suggestion:
    Clean Install of Snow Leopard
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
         1. Boot the computer using the Snow Leopard Installer Disc.  Insert the disc into the
             optical drive and restart the computer.  After the chime press and hold down the
             "C" key.  Release the key when you see a small spinning gear appear below the
             dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, set the format type to Mac
             OS Extended (Journaled, if supported), then click on the Partition button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.

  • Can I control a remote Mac with Messages?

    My OS:  Mountain Lion
    I need to control a remote Mac. The remote Mac has Internet with WildBlue Excede (satellite). I am on a cable modem. Both Macs are hard-wired to modems. I have had no luck establishing a connection with Apple Remote Desktop. I remember a day when I was able to control a remote Mac with both Macs running iChat, albeit fuzzy and somewhat slow. Now, we have Messages. Can it be done with Messages? Is there a better way?
    Thanks

    If both machines are signed into iCloud with the same account, you should be able to do remote screen sharing.  This is a lot easier if you have an Airport Extreme or a Time Capsule that lets you put your iCloud credentials in there.
    I think with message you'd be able to remote screen control but the remote user would have to accept your request.

  • Can't control external monitor volume with macbook keyboard

    I just picked up a new LG display that I am connected to my haswell rMBP through Thunderbolt. Everything is working great but I can't control the volume of the monitor with the macbook keys, it is all grayed out.
    I have set up an multi-output device in audio midi setup and so I am getting volume from the monitor and the macbook at the same time for great sound, but I would love to be able to control it from the volume keys on my rMBP.
    I have googled and tried soundflower but there doesn't seem to be a current app for Mavericks.
    I can command click on the volume icon and divert back to rMBP to bump volume down, but that is more steps than I need.
    Any help would be appreciated.

    I have the same problem.

  • Can I control my Apple TV with a Samsung Smart Touch Remote?

    I am trying to control my Apple TV2 with a Samsung 7 series Smart Touch remote. The Samsung universal remote options do not seem to work, nor does the Apple TV apear to be capable of reading inputs from the remote through the Apple TV 3rd party remote setup.

    I do not know if anyone else noticed this. I have a Samsung Un55hu7250 and the above solution worked with one exception.
    If you add it as a "Home Theater" type system then, you cannot tell the TV to use your actual home theater system for the volume control.
    If you instead, On your tv got to system/device manager/Universal remote setup. Then choose blue ray device and type in apple. Select Apple, do the power on test, then select "no it didn't work". Then it will ask you to enter the model number of the Blue Ray device. Type in "Apple" in the search and it will list Both Apple1 and Apple2 in the device list. Select Apple2 and then you will have an Apple TV that is configured as a DVD Player so you can tell the TV to control the volume via the Home Theater system.
    Net result, I have one remote again finally with Apple TV, Samsung TV, Dish Hopper, Sony BD, Antenna TV and surround sound. (Only if you are using the optical audio out to the theater system)

  • How can i control my iPad 2 with a interactive projecter?

    we are buying a epson interactinve projecter, and i was wondering if i can control my ipad by just swiping on the projecter screen.
    i know you can control a normal computer by left & right-clicking on the screen, but can you control an iPad?
    BTW, yes the projecter is compatable with. the iPad.

    Assuming it works the same as an interactive whiteboard and Epson has not made an interactive whiteboard app (and I haven't heard of such a thing, I likely would have from a distributor source I have), all you can do is view the iPad through the projector. There is no way that I know of to control it from the projector. I would contact Epson or the source you're ordering the projector from to find out for sure - ask very specifically what you're looking for (i.e. more than being able to view the ipad through the projector).

  • How can i control the I2C bus with Labview

    Hi
    How can i control the k8000 from http://www.velleman.be ( I2C bus) with
    Labview.
    all info is welcome.
    [email protected]

    if you are using Linux (and the Linux version of LabVIE W) it should be
    fairly easy to use the lm_sensors ( http://www.netroedge.com/~lm78/ )
    libraries and source code to control a device connected to a PC's I2C bus.
    Go here http://www.netroedge.com/~lm78/hardhack.html to see how to tap into
    the I2C bus of your PC. You may be able to apply info here to roll-your-own
    on a MS Windows 98 / 2000 OS.
    Chris
    "Wouters V" wrote in message
    news:39fff2de$0$4493$[email protected]..
    > Hi
    >
    > How can i control the k8000 from http://www.velleman.be ( I2C bus)
    with
    > Labview.
    > all info is welcome.
    >
    > [email protected]
    >
    >
    >
    >
    >

Maybe you are looking for

  • Adobe Bridge & .EPS files

    After renaming and sorting all 5-10 gigs of my vector artwork last night, by catergory/style and launching Bridge to start keywording that particular Main folder (Vector Art) of all my design materials to get more organized, I ran into an issue!!  Wh

  • How to read file with JNI?

    Hello, I want to implement a native function that has as a parameter a File type. For example: public native void readFile(File f); But as far as I know the JNI does not support File type, or I am wrong? One way to solv this problem i of course to co

  • JVM process is suddenly crashing

    Hi ! since a couple of days (yesterday once, today twice), my weblogic process is dying ! I<ve looked at the log files (app log and http request logs) and nothing bad seems to happen. Does anybody have a clue of what is this ? can it be memory proble

  • ClassNotFoundException while using readObject.

    I have a servlet that queries a database and creates a object called Notice (an object that implements Serializable), and sends it to an applet. My problem is that I get a ClassNotFoundException when I try to cast the object back (Notice) when i read

  • Maximum characters in line of notepad line

    Hi, I am reading and writing data on notepad file. Can anybody tell me maximum characters which can be written on single line of notepad file. thanks in advance.