PDA

View Full Version : AppleScript problem : making customized slideshow




airfang
Mar 30, 2009, 10:56 AM
Hi all, I just started AppleScript programming and have stumbled onto sth I cannot solve.

Basically I would like to be able to select randomly from a folder some pictures and start displaying them in fullscreen mode. The catch is I want to set specifically the delay between each slide.

The easiest way I can think of is using Quicklook, but unfortunately it does not seem to do the trick:

activate application "Finder"
tell application "System Events"
tell process "Finder"
keystroke "a" using {command down}
keystroke "y" using {command down, option down}
end tell
end tell

This automatically starts the slide show, but that is not what I want. I wanted to send keystroke space to pause the slideshow and use delay and keystroke left/right to go around, but unfortunately whenever Quicklook is activated, keystrokes sent to Finder no longer works. Then again there is no process named "Quicklook", the frontmost process is still "Finder".

Is there any way I can send a keystroke to Quicklook?
Or do I have to resort to other applications like iPhoto/Keynote for that matter?

Thanks!