banjoman Posted September 26, 2005 Share Posted September 26, 2005 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted September 26, 2005 Developers Share Posted September 26, 2005 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 programUse 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 More sharing options...
Developers Jos Posted September 26, 2005 Developers Share Posted September 26, 2005 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 More sharing options...
banjoman Posted September 27, 2005 Author Share Posted September 27, 2005 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 More sharing options...
herewasplato Posted September 27, 2005 Share Posted September 27, 2005 (edited) thanks, but I do not understand how the $CmdLine fits into a scriptI 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 ppsor open the ppt and do a file save as ppsRun(@comSpec & " /c start c:\temp\test.pps", "", @SW_HIDE) Edited September 27, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
banjoman Posted September 27, 2005 Author Share Posted September 27, 2005 wow, thanks very much, your prompt help is much appreciated Link to comment Share on other sites More sharing options...
Qwerty212 Posted February 6, 2008 Share Posted February 6, 2008 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 More sharing options...
simusphere Posted February 6, 2008 Share Posted February 6, 2008 (edited) 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 BarcelonaThat 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 February 6, 2008 by simusphere Link to comment Share on other sites More sharing options...
Qwerty212 Posted February 7, 2008 Share Posted February 7, 2008 (edited) 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.and the graphics hardware acceleration button shows that info on window info: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.CODERun(@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")EndIfsend("{ENTER}")send("{F5}")ExitNotice 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 February 7, 2008 by adolfito121 Link to comment Share on other sites More sharing options...
ResNullius Posted February 7, 2008 Share Posted February 7, 2008 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 BarcelonaOn 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 More sharing options...
Qwerty212 Posted February 8, 2008 Share Posted February 8, 2008 It works!!! I was looking over the net, posting on MS forums with no results... and you fixed the acceleration problem with one script of one line Thankyou very much!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now