jagreygoose icon

Presentation Macro Snippet

jagreygoose | PRO | 06/12/14 10:32:41 AM UTC | 0 ⭐ | 9861 👁️ | Never ⏰ | []
AutoIt |

1.05 KB

|

None

|

0 👍

/

0 👎

#include <TrayConstants.au3>
Global $fFlag = False
 
Opt("TrayMenuMode", 3)
Opt("TrayOnEventMode", 1)
TrayCreateItem("Exit")
TrayItemSetOnEvent(-1, "ExitScript")
 TraySetToolTip("Presentation Macro")
TrayTip("", "Slide Presenter Ready", 5,  $TIP_NOSOUND)
 
While 1
   If WinActive("[CLASS:screenClass]")  And $fFlag = False Then
      HotKeySet ( "{F5}", "startVideo" )
      HotKeySet ( "b", "stopVideo" )
      $fFlag = True
       ConsoleWrite("presentation")
   ElseIf WinActive("[CLASS:PPTFrameClass]") And $fFlag = True Then
      HotKeySet ( "{F5}")
      HotKeySet ( "b")
      $fFlag = False
       ConsoleWrite("powerpoint")
   EndIf
   Sleep(100)
WEnd
 
Func startVideo()
   MouseMove(@DesktopWidth/2, @DesktopHeight/2, 1)
   MouseMove(@DesktopWidth/2, @DesktopHeight/3, 1)
   MouseMove(@DesktopWidth/100, @DesktopHeight/100, 1)
   Send("{ALTDOWN}{p}{ALTUP}")
   sleep(50)
   Send("{a}")
   ConsoleWrite("playtoggle")
EndFunc
 
 
Func stopVideo()
   Send("{ALTDOWN}{q}{ALTUP}")
   ConsoleWrite("stop")
EndFunc
 
 
Func ExitScript()
    Exit
EndFunc

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎