How can i stop an iPhoto Slideshow with Applescript
I have set up a system with a Mac Mini to boot at 7am and launch an iPhoto slideshow using energy saver schedules and a simple applescript in the login items.
I have also scheduled the machine to shutdown at 1130pm. However, the logout process is cancelled because iPhoto fails to stop the slideshow.
I think the way forward is to write another applscript and use the iCal appointment alarm to launch it 5 mins before the machine is scheduled to shutdown.
However, i cannot get this to work either.
I have enabled the access for assistive devices in Universal access and used commands like :
tell application "iPhoto"
stop slideshow
quit
end tell
and
tell application "iPhoto"
activate
tell application "system events"
keystroke escape key
end tell
quit
end tell
but it still doesn't end the slideshow.
Any help would be gratefully received!
I have also scheduled the machine to shutdown at 1130pm. However, the logout process is cancelled because iPhoto fails to stop the slideshow.
I think the way forward is to write another applscript and use the iCal appointment alarm to launch it 5 mins before the machine is scheduled to shutdown.
However, i cannot get this to work either.
I have enabled the access for assistive devices in Universal access and used commands like :
tell application "iPhoto"
stop slideshow
quit
end tell
and
tell application "iPhoto"
activate
tell application "system events"
keystroke escape key
end tell
quit
end tell
but it still doesn't end the slideshow.
Any help would be gratefully received!
Mac OS X (10.4.9)