Zombie02 Posted July 1, 2019 Posted July 1, 2019 Hello Guys i am new to Autoit. I am currently writing a GUI which is displaying a avi. My question now is how can i use a avi i added with Autoit3wrapper Thanks is advance Zombie
BrewManNH Posted July 1, 2019 Posted July 1, 2019 Look at the _GUICtrlAVI_* functions and see if they'll work for you. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Zombie02 Posted July 1, 2019 Author Posted July 1, 2019 2 hours ago, BrewManNH said: Look at the _GUICtrlAVI_* functions and see if they'll work for you. Unfortunately no the function should work Like the guictrlsetimage function
BrewManNH Posted July 1, 2019 Posted July 1, 2019 2 hours ago, Zombie02 said: Unfortunately no the function should work Like the guictrlsetimage function Not sure what you're trying to say here. What function should work that way? If you're trying to embed a movie into a GUI, you can't just set it to a control, you have to create the control differently than say a picture or an icon. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Zedna Posted July 2, 2019 Posted July 2, 2019 (edited) It's simple like this: #AutoIt3Wrapper_Res_File_Add=test_avi.avi, avi, 150 #include <GuiAVI.au3> #include <GUIConstantsEx.au3> Example() Func Example() Local $hGUI, $hAVI ; Create GUI $hGUI = GUICreate("(Internal) AVI OpenEx", 300, 100) $hAVI = _GUICtrlAVI_Create($hGUI, "", -1, 10, 10) GUISetState(@SW_SHOW) ; Play the sample AutoIt AVI ;~ _GUICtrlAVI_OpenEx($hAVI, @SystemDir & "\Shell32.dll", 150) _GUICtrlAVI_OpenEx($hAVI, @ScriptFullPath, 150) ; Play the sample AutoIt AVI _GUICtrlAVI_Play($hAVI) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Close AVI clip _GUICtrlAVI_Close($hAVI) GUIDelete() EndFunc ;==>Example Note: It's modified example from helpfile for _GUICtrlAVI_OpenEx() "C:\Program Files\Examples\Helpfile\_GUICtrlAVI_OpenEx.au3" EDIT: Don't forget that to test it you have to run COMPILED exe file (not run au3 directly from Scite) and you have to compile script using FULL Scite4AutoIt3 because of used #AutoIt3Wrapper_Res_File_Add directive EDIT2: Here is simplified example without explicit call of _GUICtrlAVI_OpenEx() #AutoIt3Wrapper_Res_File_Add=test_avi.avi, avi, 150 #include <GuiAVI.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate("(Internal) AVI Open", 300, 100) $hAVI = _GUICtrlAVI_Create($hGUI, @ScriptFullPath, 150, 10, 10) GUISetState(@SW_SHOW) _GUICtrlAVI_Play($hAVI) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUICtrlAVI_Close($hAVI) test_avi.avi Edited July 2, 2019 by Zedna edit2 Resources UDF ResourcesEx UDF AutoIt Forum Search
Zombie02 Posted July 2, 2019 Author Posted July 2, 2019 6 hours ago, Zedna said: It's simple like this: #AutoIt3Wrapper_Res_File_Add=test_avi.avi, avi, 150 #include <GuiAVI.au3> #include <GUIConstantsEx.au3> Example() Func Example() Local $hGUI, $hAVI ; Create GUI $hGUI = GUICreate("(Internal) AVI OpenEx", 300, 100) $hAVI = _GUICtrlAVI_Create($hGUI, "", -1, 10, 10) GUISetState(@SW_SHOW) ; Play the sample AutoIt AVI ;~ _GUICtrlAVI_OpenEx($hAVI, @SystemDir & "\Shell32.dll", 150) _GUICtrlAVI_OpenEx($hAVI, @ScriptFullPath, 150) ; Play the sample AutoIt AVI _GUICtrlAVI_Play($hAVI) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Close AVI clip _GUICtrlAVI_Close($hAVI) GUIDelete() EndFunc ;==>Example Note: It's modified example from helpfile for _GUICtrlAVI_OpenEx() "C:\Program Files\Examples\Helpfile\_GUICtrlAVI_OpenEx.au3" EDIT: Don't forget that to test it you have to run COMPILED exe file (not run au3 directly from Scite) and you have to compile script using FULL Scite4AutoIt3 because of used #AutoIt3Wrapper_Res_File_Add directive EDIT2: Here is simplified example without explicit call of _GUICtrlAVI_OpenEx() #AutoIt3Wrapper_Res_File_Add=test_avi.avi, avi, 150 #include <GuiAVI.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate("(Internal) AVI Open", 300, 100) $hAVI = _GUICtrlAVI_Create($hGUI, @ScriptFullPath, 150, 10, 10) GUISetState(@SW_SHOW) _GUICtrlAVI_Play($hAVI) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUICtrlAVI_Close($hAVI) test_avi.avi 20.31 kB · 1 download Yes this was exactly what i was looking for. Thank you for your help
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now