Jump to content
Sign in to follow this  
Draygoes

Trying to learn GUICreateAvi()... Avi file never starts.

Recommended Posts

Draygoes

I have been using the help file for a little while, trying to get this to work without entirely using the example code.

The interface opens, but displays nothing. I would upload the avi file, but its 180 mb.

#include <GUIConstantsEx.au3>

Local $avi
GUICreate( "InvaderZim", 800, 550 )

$avi = GUICtrlCreateAvi( "\scum.avi", -1, -1, -1, -1, 800, 550 )
GUISetState(1)
GUICtrlSetState( $avi, 1 )
While 1
WEnd

Its been forever sence i have done any sort of interface work in Autoit, so I am kindof starting from scratch. Any help is appricated.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
BrewManNH

Read the help file for that function, your parameters for GUICtrlCreateAvi are wrong.

  • Like 1

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 Gude
How 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

Share this post


Link to post
Share on other sites
Draygoes

And that is exactly where I get lost:


filename The filename of the video. Only .avi files are supported. subfileid id of the subfile to be used. If the file only contains one video then use 0. left The left side of the control. If -1 is used then left will be computed according to GUICoordMode. top The top of the control. If -1 is used then top will be computed according to GUICoordMode. width [optional] The width of the control (default is the previously used width). height [optional] The height of the control (default is the previously used height). style [optional] Defines the style of the control. See GUI Control Styles Appendix.

default (-1) : $ACS_TRANSPARENT
$ACS_TRANSPARENT is always used unless $ACS_NONTRANSPARENT is specified. exStyle

[optional] Defines the extended style of the control. See Extended Style Table.

 

 

I tried changing my code accordingly, but to no avail.

#include <GUIConstantsEx.au3>

Local $avi
GUICreate( "InvaderZim", 800, 550 )

$avi = GUICtrlCreateAvi( "\scum.avi", 0, -1, -1, -1, 800, 550 )
GUISetState(1)
GUICtrlSetState( $avi, 1 )
While 1
WEnd

EDIT:
I know this makes me look like a complete noob, and I accept that. Its been a long time sence I have designed anything to do with interfaces in Autoit, but why the above doesnt work makes no sence to me what so ever.

I am not asking for the entire code be re-written (Its only practice anyway), I just need someone to explain where I went wrong.

Edited by Draygoes

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
BrewManNH

Count the parameters again, your width is set to -1 your height is set to 800 and your setting the style to 500.

  • Like 1

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 Gude
How 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

Share this post


Link to post
Share on other sites
Draygoes

Now I am really confused, and as much as I wish not to ask, I must ask it anyway...

Will you please show me the correct code? Its still for me to learn, but I must know the right way to handle this, and the help file is killing me, as it seems to say that I am correct. :

Corrected code still doesnt work:

#include <GUIConstantsEx.au3>

Local $avi
GUICreate( "InvaderZim", 800, 550 )

$avi = GUICtrlCreateAvi( "\scum.avi", 0, -1, -1, 800, 550 )
GUISetState(1)
GUICtrlSetState( $avi, 1 )
While 1
WEnd
Edited by Draygoes

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
Draygoes

No, its not as important as that, but I am trying to relearn all of the functions that I missed.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
BrewManNH

Now I am really confused, and as much as I wish not to ask, I must ask it anyway...

Will you please show me the correct code? Its still for me to learn, but I must know the right way to handle this, and the help file is killing me, as it seems to say that I am correct. :

 

Corrected code still doesnt work:

I ran that code with an avi on my system and it worked fine. Perhaps it has something to do with the avi you're using.
  • Like 1

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 Gude
How 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

Share this post


Link to post
Share on other sites
Draygoes

Is there a size limate to the avi file or somthing? I downloaded and converted it from youtube, but it runs fine in other players...

Nevermind, It only ran on one player, which tells me that you where correct.

Thank you very much for your help. ^_^

Edited by Draygoes

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
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
Sign in to follow this  

×