PDA

View Full Version : Folder Actions with PowerPoint Slide Shows




kharkaar
Jun 21, 2011, 07:55 PM
Hi everyone, this is my first post and I need help with the following:

I'm trying to set up a folder action script to a specific folder so whenever a file with".ppsx" or ".pps" extension is added to this folder, I want it to automatically open.

This is what I have done so far and it works to an extend:

on adding folder items to this_folder after receiving added_items
try
repeat with this_item in added_items
tell application "Finder"
if name extension of this_item is "ppsx" or "pps" then
open this_item
end if
end tell
end repeat
end try
end adding folder items to

It does open the slide show and it runs perfectly BUT THE PROBLEM is when I add a new file to this folder, it doesn't refresh. It keeps the older slide show active.

I wouldn't mind if the older file is deleted upon adding the new one. But I don't know how. Please help.



kainjow
Jun 21, 2011, 09:27 PM
You could possibly just quit PowerPoint so that when it opens the other one it's starting fresh. Try putting this before the "open" command.

tell application "Microsoft PowerPoint" to quit

kharkaar
Jun 21, 2011, 09:43 PM
You could possibly just quit PowerPoint so that when it opens the other one it's starting fresh. Try putting this before the "open" command.

tell application "Microsoft PowerPoint" to quit

Thanks for the reply. I did that but still opens up the old file. Any ideas?

It actually closes the application but opens it with the old file and when I press escape then it closes the old file and opens the new one.