Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kharkaar

macrumors newbie
Original poster
Jun 21, 2011
2
0
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:

Code:
[COLOR="Blue"]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[/COLOR]

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.
 
Last edited by a moderator:
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.

Code:
[b]tell[/b] [i][color=#0000ff]application[/color][/i] "Microsoft PowerPoint" [b]to[/b] [b][color=#0000ff]quit[/color][/b]
 
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.

Code:
[b]tell[/b] [i][color=#0000ff]application[/color][/i] "Microsoft PowerPoint" [b]to[/b] [b][color=#0000ff]quit[/color][/b]

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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.