Re: PowerPoint Slide Show
Re: PowerPoint Slide Show
- Subject: Re: PowerPoint Slide Show
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 10 Sep 2009 19:43:53 -0700
- Thread-topic: PowerPoint Slide Show
On 9/10/09 4:07 PM, "Gabriel Zachmann" <email@hidden> wrote:
> Does anybody know, how I can make Powerpoint start a Slideshow at a
> specific slide, i.e., slide number n, from Applescript?
> Or how I can jump to a specific slide, while a slideshow is running?
>
> I would like to do this from a Cocoa application using Scripting Bridge.
>
> I know to start and stop a slide show, and how to make a step forward
> or backward in the slide show from my Cocoa app.
>
> But I could not find a way to do what I described above.
> (Going through the whole slide show programmatically is not really an
> option, since the slide set could contain 100 slides or more.)
This is all without testing, since I don't use PowerPoint. But all those
things you want to do seem quite possible from a cursory look at the PPT AS
Dictionary. (Make sure you're using PPT 2008. 2004 was too buggy to
contemplate using AS seriously there.)
In the dictionary,
run slide show
command takes a 'slide show settings' direct parameter. The 'slide show
settings' instance you want is a property of the presentation from which
your slide show derives. Let's assume it's the 'active presentation' (or
presentation 1). You can modify several properties of that 'slide show
settings' - which is a class - including 'starting slide' and 'ending slide'
both of which are expressed by integers (the number of the respective
slide). There is also an 'advance mode' property which lets you set it to
manual or 'use slide timings' - and the timing can be set by a rather
complicated procedure, it appears. (It looks like you'd create an effect for
the main sequence of every slide, and then set whatever properties you wish,
including duration, of the 'timing' property of that effect.)
Although there's no pause or resume commands, you can choose to 'run slide
show' starting from one slide and ending at another, and 'run slide show'
again starting at a different slide number and ending at yet another. (It
looks to me as if 'go to slide' [integer] command operates only on document
window views, not slide show window views, so that probably would not help
here.)
Now there are also simple commands to 'go to next slide', 'go to previous
slide', 'go to first slide', 'go to last slide' that all operate exclusively
on 'slide show view'
So, for example, you ought to be able to
set sss to slide show settings of active presentation
set starting slide of sss to 1
set ending slide of sss to 5
set ssWindow to run slide show sss -- opens slide show, runs first 5
delay 10 -- wait 10 seconds
set ssView to slideshow view of ssWindow
go to next slide ssView -- slide 6
delay 10
go to next slide ssView -- slide 7
delay 5
set starting slide of sss to 8
set ending slide of sss to 12
run slide show sss -- slides 8 thru 12
delay 10 -- wait 10 seconds
go to last slide ssView -- may have to reset ssView first as before
delay 15
exit slide show ssView
That's where I'd start from if I were trying to do it. But, as I said, I've
not attempted this. You'll have to check it out and take it from there,
testing one step at a time.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden