Jump to content

show a PowerPoint presentation


banjoman
 Share

Recommended Posts

  • Developers

;)

how can I automatically run a PowerPoint presentation from an AutoIt script?

I mean 'show' the presentation (the option you get when you right click on a PowerPoint file) not just load the presentation into the PowerPoint program

Use these commandline parameters: /s "<FileName>"

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Use these commandline parameters: /s "<FileName>"

or use the BETA with this syntax:

$PPT = ObjCreate("PowerPoint.Application")

$Pres = $PPT.Presentations.Open("Your_Presentation.ppt", False, False, False)

$Pres.SlideShowSettings.Run

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

thanks, but I do not understand how the $CmdLine fits into a script

I have tried a few experiments and scoured the help file, but I am none the wiser

/s is a windows code for 'show'?

does the file name have to be the full path or just the file name and extension if the script is in the same folder as the PowerPoint file?

Link to comment
Share on other sites

thanks, but I do not understand how the $CmdLine fits into a script

I have tried a few experiments and scoured the help file, but I am none the wiser

/s is a windows code for 'show'?

does the file name have to be the full path or just the file name and extension if the script is in the same folder as the PowerPoint file?

Run("C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE /s c:\temp\test.ppt")

or rename the file extention to pps

or open the ppt and do a file save as pps

Run(@comSpec & " /c start c:\temp\test.pps", "", @SW_HIDE)

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • 2 years later...

Has anybody tried to do a script that opens a .ppt, activates the graphics hardware acceleration check box and then run the ppt??

Powerpoint doesn't save this option (you can try it, just make a ppt with hardware graphics acceleration turned on, then restart the computer and this option will be off the next time you open this ppt).

It's very fustrating because if you want to run the ppt in kiosk mode and you're using a mouseless computer it will always show the ppt slowly.

Greets from Barcelona

Link to comment
Share on other sites

Has anybody tried to do a script that opens a .ppt, activates the graphics hardware acceleration check box and then run the ppt??

Powerpoint doesn't save this option (you can try it, just make a ppt with hardware graphics acceleration turned on, then restart the computer and this option will be off the next time you open this ppt).

It's very fustrating because if you want to run the ppt in kiosk mode and you're using a mouseless computer it will always show the ppt slowly.

Greets from Barcelona

That is fairly eaisy to do, but you may want to go through some of the help files so you can do the scripting yourself. It's not that hard.

Here is an example of how to run a pptx show that first checks if the hardware acceleration is on in powerpoint 2007 and sets it accordingly. I don't know what version of office you are running so you may have to tweak the script a little. Use the window info tool to get exact information for your version of office.

Run(@ComSpec & " /c start c:\users\joeshmo\Desktop\test.pptx")
sleep (1000)
Send("!ss")
WinWaitActive("Set Up Show")
$checkstate = ControlCommand("Set Up Show", "Use hardware", "[CLASS:Button; INSTANCE:23]", "IsChecked", "")
If $checkstate == 0 Then
   send("!g")
EndIf
send("{ENTER}")
send("{F5}")
Exit
Edited by simusphere
Link to comment
Share on other sites

Thank you very much. I've tried your script but, obviously, it doesn't works on my spanish powerpoint :)

I've downloaded a spanish .chm help file for newbies, but I don't know what I'm doing wrong.

The spanish powerpoint is the same as the english one, so the buttons have the same ClassnameNN on both versions.

Posted Image

Posted Image

and the graphics hardware acceleration button shows that info on window info:

Posted Image

I've changed somethings on your script (for example I put the .ppt on C:\ because for me it's easier to use that script on other computers), but there is no way that I coul get it work right.

It only opens the powerpoint and the spanish setup show, but it doens't activate the acceleration and neither runs the ppt.

CODE
Run(@ComSpec & " /c start c:BOTIGA.ppt")

Sleep (10000)

Send("!r")

WinWaitActive("Configurar presentación")

ControlCommand("Configurar presentación", "Utili&zar aceleración de gráficos de hardware", "[CLASS:Button; INSTANCE:23]", "IsChecked", "")

If $checkstate == 0 Then

send("!z")

EndIf

send("{ENTER}")

send("{F5}")

Exit

Notice that to open Set Up Show in spanish powerpoint I need ALT+r and to activate the graphics acceleration I need ALT+z... what do I'm doing wrong?

I would apreciatte so much any help.

I'm on powerpoint 2003 and winxp sp2.

Greets from Barcelona (Sorry for my poor english)

Edited by adolfito121
Link to comment
Share on other sites

Has anybody tried to do a script that opens a .ppt, activates the graphics hardware acceleration check box and then run the ppt??

Powerpoint doesn't save this option (you can try it, just make a ppt with hardware graphics acceleration turned on, then restart the computer and this option will be off the next time you open this ppt).

It's very fustrating because if you want to run the ppt in kiosk mode and you're using a mouseless computer it will always show the ppt slowly.

Greets from Barcelona

On PowerPoint 2003, this registry write will enable hardware acceleration

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\Options", "SlideShowUseDirect3D", "REG_DWORD", 00000001)

Notes: You have to run this before PowerPoint is opened. It appears the key is`read on startup and written to on exit.

Change the 00000001 to 00000000 to disable acceleration.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...