功能:读取演示状态PPT的备注,目的是无法启用演讲者视图时,DIY提示备注。
 本脚本的实现感谢:火冷、万年书妖、彪悍的小玄

/*
功能:读取演示状态PPT的备注,目的是无法启用演讲者视图时,DIY提示备注。
本脚本的实现感谢:火冷、万年书妖、彪悍的小玄
*/
SetTimer, tip, 500
prePage:=0
Return
tip:
Try{
    this_show:=ComObjActive("Powerpoint.application").SlideShowWindows(1).View.slide
    curPage:=this_show.SlideIndex
    If(prePage!=curPage)
    {
        Text:=this_show.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Text
        ; ToolTip, %Text%, 0, 0
        showtext(Text)
        prePage:=curPage
    }
}
Catch
{
    ; ToolTip
    Gui,Destroy
}
Return


; showtext("HELO")
;;文字提示  ;在桌面上打印文字的
showtext(str)
{
    y := 100  ;;y is the y-coordinate of the prompting window
    ; y := A_ScreenHeight - 388   ;;y is the y-coordinate of the prompting window
    Gui,Destroy
    Gui,+AlwaysOnTop +Disabled -Caption -SysMenu +Owner +LastFound
    WinGet,hwnd,ID
    Gui, font, s16 cFF0000 w600, Verdana
    Gui, Color, FF0001
    WinSet, TransColor, FF0001 255

    w:=A_ScreenWidth-600
    ; Gui,Add,Text ,BackgroundTrans W%w%  R10 ,%str%    
    Gui,Add,Text ,BackgroundTrans W%w%  R10 ,%str%
    Gui, Show, NoActivate Y%y% NA, Title of Window


    ; Sleep,10000
    ; Gui,Destroy
}