Running an Applescript from Image Capture

in Genius Bar edited January 2014
When I put a flash memory card into my PowerBook's PCMCIA slot, I want it to download all the photos and unmount the card from the finder so I can take it out without pressing a key. I don't want the photos to be revealed in the finder.

I set up Image Capture to launch when the card is mounted. I set it up to automatically download all photos. Then I'm stuck with a mounted card and a finder window with all the photos in it.

So I wrote an Applescript that ejects the disk "Unlabeled" and closes all Finder windows. I tested it. It works great when launched manually.

I set up Image Capture to launch the script (saved as application) automatically when downloading is finished.

Now, when I stick the card in, the images are copied, the script launches, and runs and... nothing. The Applescript does nothing except close. The disk is not ejected. The finder window is not closed. There is no error message from the script. Nothing.


Anyone else know how to solve my problem?


  • Reply 1 of 2
    baumanbauman Posts: 1,248member
    First, to pause, I think you just write 'sleep x', x in number of seconds. Of course, I could just have this all jumbled... every language has just a slightly different syntax for this simple feature.

    Hmmm.... As for your script question, the only difference that I can see is that when you launch the script manually, the Finder is already 'active,' but when it's lauched by the Image Capture app, it's not.

    Try sticking an 'activate' line immediately after the 'tell application "Finder" '.

    Perhaps if you post your script I (or someone better at AS than I am) could help you out a bit more.

Sign In or Register to comment.