Running an Applescript from Image Capture
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.
WHY, OH WHY DOESN'T THE SCRIPT DO ANYTHING!!!?!?
Anyone else know how to solve my problem?
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.
WHY, OH WHY DOESN'T THE SCRIPT DO ANYTHING!!!?!?
Anyone else know how to solve my problem?
Comments
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.
HTH