Function Reference


_GUICtrlAVI_Seek

Directs an AVI control to display a particular frame of an AVI clip

#include <GuiAVI.au3>
_GUICtrlAVI_Seek ( $hWnd, $iFrame )

Parameters

$hWnd Control ID/Handle to the control
$iFrame 0-based index of the frame to display

Return Value

Success: True.
Failure: False.

Related

_GUICtrlAVI_Play

Example

Example 1

; usinf AutoIt Function

#include <GuiAVI.au3>
#include <GUIConstantsEx.au3>

_Example_Internal()

Func _Example_Internal()
    ; Create GUI
    GUICreate("(Internal) AVI Seek", 300, 100)
    Local $idAVI = GUICtrlCreateAvi(@SystemDir & "\shell32.dll", 160, 10, 10)
    GUISetState(@SW_SHOW)

    ; Loop until the user exits.
    Do
        Sleep(100)
        ; Seek to a random frame in the AVI Clip
        _GUICtrlAVI_Seek($idAVI, Random(1, 30, 1))
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Close AVI clip
    _GUICtrlAVI_Close($idAVI)

    GUIDelete()
EndFunc   ;==>_Example_Internal

Example 2

; using standard UDF

#include <GuiAVI.au3>
#include <GUIConstantsEx.au3>

_Example_External()

Func _Example_External()
    Local $hGUI, $hAVI

    ; Create GUI
    $hGUI = GUICreate("(External) AVI Seek", 300, 100)
    $hAVI = _GUICtrlAVI_Create($hGUI, @SystemDir & "\Shell32.dll", 160, 10, 10)
    GUISetState(@SW_SHOW)

    ; Loop until the user exits.
    Do
        Sleep(100)
        ; Seek to a random frame in the AVI Clip
        _GUICtrlAVI_Seek($hAVI, Random(1, 30, 1))
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Close AVI clip
    _GUICtrlAVI_Close($hAVI)

    GUIDelete()
EndFunc   ;==>_Example_External