premiere定時採集視頻

按鍵精靈腳本

設定一個時間(如12:00:00),採集10分鐘。運行時打開採集窗口。

//Premiere應用程序窗口
//    |_____MDIClient
//        |______採集主窗口
//            |______captureView
//                |______transportView
//                    |______採集控制按鈕

//啓動時間

main
   
Sub main
    Do  While true
        If time > timeserial(12, 0, 0) Then Exit Do
        Delay 1000
    Loop

    //採集10分鐘視頻
    PressCapButton
    Delay 600000
    PressCapButton
    Delay 1000
    saveCapFile

End Sub
 
Function getCapBtn
    HwndEx = Plugin.Window.Search("Premiere")
    w = split(HwndEx, "|")(0)
    h = Plugin.Window.FindEx(w, 0, "MDIClient", 0)
    CapWnd = Plugin.Window.FindEx(h, 0, 0, "採集")
 
    //查找TransportView窗口
    h = Plugin.Window.FindEx(CapWnd, 0, 0, "")
    cw = 0
    Do  While 1
        k=cw
        cw = Plugin.Window.FindEx(h, cw, 0, "")
        If cw = 0 Then Exit Do
        sClass = Plugin.Window.GetClass(cw)
        If instr(sClass,"TransportView")>0 Then Exit Do
    Loop
 
 
 
    //繼續查詢採集控制按鈕
    h = cw
    cw = 0
    for i=0 to 14
        cw = Plugin.Window.FindEx(h, cw, 0, "")
    next
 
    getCapBtn = cw
 
End Function

Sub PressCapButton
    sRect = Plugin.Window.GetWindowRect(getCapBtn)
    r = split(sRect,"|")
    MoveTo r(0) + 10, r(1) + 10
    LeftClick 1
End Sub

Sub saveCapFile
    HwndEx = Plugin.Window.Search("保存採集文件")
    w = split(HwndEx, "|")(0)
    HwndEx = Plugin.Window.FindEx(w, 0, "Button", "確定")
    sRect = Plugin.Window.GetWindowRect(HwndEx)
    r = split(sRect,"|")
    MoveTo r(0) + 10, r(1) + 10
    LeftClick 1
End Sub

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章