On my 10.6.3 iMac Picasa doesn’t load camera pics and thus has a blank ‘Imports’ tab saying ‘No photos available’. I can’t see the camera in Finder either although it is registered in System Profile - USB. The camera and Picasa behave predictably under 10.5.8.
I have tried writing an Applescript to launch first Image Capture to load the photos (via AutoImporter) and then launch Picasa so that I can work on them. It only loads Picasa. The script looks like this:
tell application "Finder"
activate
open application file "Image Capture.app" of folder "Applications" of startup disk
do shell script "/bin/sleep 5"
activate
open application file "Picasa.app" of folder "Applications" of startup disk
end tell
The ‘sleep’ was in case the one opening interfered with the other doing so. It didn’t seem to help.
I’m obviously missing something, but I don’t know what.
Why not normally?
activate application "Image Capture"
delay 5
activate application "Picasa"
Some basics:
Tell application "Image Capture" to launch
or
Tell application "Image Capture"
launch
end tell
or
tell application "Finder"
open application file "Image Capture.app" of folder "Applications" of startup disk
end tell
All do the same thing. They tell the app to start launching, and then the script immediately continues to the next line, while the app is starting itself up.
If you want the script to launch the app and wait for it to complete its startup and be ready, then you want “Activate”.
Tell application "Image Capture" to activate
And on a side note, you don’t need to tell the Finder to “Activate” to have it do something. The only time you really need to activate the Finder is if it is behind other apps and you want to see what it is doing.
Thanks, Dylan and Matt.
Sorry about the delay.
Fired up by the possibilities of minimal coding implied by you, I wrote:
activate application "Image Capture"
activate application "Picasa"
It ran Image Capture but not Picasa! If ‘activate’ lets it complete its actions before the next line then this should have worked… Shouldn’t it?? Is more needed?
As Image Capture is not supposed to be the frontmost application, try this
launch application "Image Capture"
activate application "Picasa"
StefanK, I tried it but Picasa stayed asleep! Just for fun I included “delay 5” in a second attempt but, alas, no change.
The original problem remains…
Model: iMac
AppleScript: 2.3
Browser: Firefox 3.6.3
Operating System: Mac OS X (10.6)