Sunday, October 23, 2011

a fix for PowerPoint slideshows

If you find yourself using PowerPoint's feature to show on one screen while you edit on the other, you may get tired of having to switch to the "show" program to advance slides. I wrote a little AutoHotkey scrip that will switch to the PowerPoint slideshow before firing the page or arrow keys:



#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.


MsgBox, The PgDn, PgUp, and arrow keys will now switch to the PowerPoint show before enacting. Close the H in the taskbar to quit.


PgDn::
WinActivate, PowerPoint Slide Show
Send {PgDn}
Return


PgUp::
WinActivate, PowerPoint Slide Show
Send {PgUp}
Return


Right::
WinActivate, PowerPoint Slide Show
Send {PgDn}
Return


Left::
WinActivate, PowerPoint Slide Show
Send {PgUp}
Return


Down::
WinActivate, PowerPoint Slide Show
Send {PgDn}
Return


Up::
WinActivate, PowerPoint Slide Show
Send {PgUp}
Return


WheelDown::
IfWinActive, PowerPoint Slide Show
{
Send !{TAB}
}
Send {WheelDown}
Return


WheelUp::
IfWinActive, PowerPoint Slide Show
{
Send !{TAB}
}
Send {WheelUp}
Return