Jump to content

Play AVI while downloading?


 Share

Recommended Posts

AVI is not depended on external events other than it's own. It's either playing it's own animation GUICtrlSetState($AVI, $GUI_AVISTART) or not playing it GUICtrlSetState($AVI, $GUI_AVISTOP). You can test it, make a gui with a button control and start the avi, pushing the button may popup a message box, if the avi animation keep looping then nothing will stop it but GUICtrlSetState($AVI, $GUI_AVISTOP) or program termination.

Edit: Here, take a look:

#include <GuiConstantsEx.au3>

Dim $hGUI = GUICreate('Test', 200, 100)
Dim $AVI = GUICtrlCreateAvi('shell32.dll', 150, 0, 0)
Dim $Button = GUICtrlCreateButton('Button', 70, 70, 60, 25)

GUISetState()
GUICtrlSetState($AVI, $GUI_AVISTART)

While 1
    Switch GUIGetMsg()
        Case $Button
            MsgBox(0x30, 'Title', 'Text')
        
        Case -3
            ExitLoop
    EndSwitch
    Sleep(20)
WEnd

GUIDelete()
Edited by Authenticity
Link to comment
Share on other sites

AVI is not depended on external events other than it's own. It's either playing it's own animation GUICtrlSetState($AVI, $GUI_AVISTART) or not playing it GUICtrlSetState($AVI, $GUI_AVISTOP). You can test it, make a gui with a button control and start the avi, pushing the button may popup a message box, if the avi animation keep looping then nothing will stop it but GUICtrlSetState($AVI, $GUI_AVISTOP) or program termination.

Edit: Here, take a look:

#include <GuiConstantsEx.au3>

Dim $hGUI = GUICreate('Test', 200, 100)
Dim $AVI = GUICtrlCreateAvi('shell32.dll', 150, 0, 0)
Dim $Button = GUICtrlCreateButton('Button', 70, 70, 60, 25)

GUISetState()
GUICtrlSetState($AVI, $GUI_AVISTART)

While 1
    Switch GUIGetMsg()
        Case $Button
            MsgBox(0x30, 'Title', 'Text')
        
        Case -3
            ExitLoop
    EndSwitch
    Sleep(20)
WEnd

GUIDelete()

Okay now i really confused! lol

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...