Hi again Shawn,
I got it fixed, but you are not gonna believe this ... so I will try to be as clear as possible and write this step by step:
A few notes beforehand:
- My system is fully updated Yosemite 10.10.2, including all updates to MS Office for Mac.
- Before now, I was never even able to save your script in the Script Editor, the error I quoted popped up before I was actually able to save the script.
And now what happened:
1) I started Microsoft PowerPoint for Mac
2) I started Script Editor
3) Since I am completely unfamiliar with AppleScript, I just started adding "of" anytime I got an error from the script while attempting to save it in Script Editor. I ended up with someting that actually saved to a file and looked like this:
tell application "Microsoft PowerPoint"
run slide of show of slide of show of settings of active of presentation
go to next of slide of slide of show of view of slide of show of window 1
I assume this is just a completely broken piece of code. Interestingly enough, I was also able to run this in Script Editor.
4) I tried to run the code at which point an application called "Microsoft PowerPoint" opened.
However! This has actually opened "Microsoft PowerPoint" from my virtualized Windows through Parallels, not the native PowerPoint 2011 for Mac. After that the script failed (unsurprisingly):
error "The variable presentation is not defined." number -2753 from "presentation"
5) I quit Script Editor and the PowerPoint running from my virtualized Windows through Parallels.
6) I started Script Editor again, pasted in your code and voilá your script and the alfred workflow now work perfectly.
I wish I had an explanation or a way to make this reproducible. I assume the issue of misidentifying the two PowerPoint apps was probably at the heart of the problem, since both the native and the virtualized application are called "Microsoft PowerPoint", i.e. there was no way for the script to discern between the two. Do you think it is possible to call the application "Microsoft PowerPoint" through some other identifier? Maybe through process name instead?