Sign in to follow this  
Followers 0
Gene

GUICtrlCreateAvi

5 posts in this topic

#1 ·  Posted (edited)

I waited until the GUI development seemed fairly mature to get into it. ;) I installed the 1/1/2005 unstable version. I'm starting with the examples from the help file. :lol:

Oh, if this should be in the BUGS section... I tried there, but wasn't allowed to. :idiot:

#include <GUIConstants.au3>

The line above should have " marks, not angle brackets, shouldn't it?

$ACS_CENTER = 1
$ACS_AUTOPLAY = 4
$ACS_TIMER = 8 
$ACS_NONTRANSPARENT = 16

GUICreate ("My GUI Animation",300,200)
$ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10)

$buttonstart = GUICtrlCreateButton ("start",50,150,70,22)
$buttonstop  = GUICtrlCreateButton ("stop",150,150,70,22)

GuiSetState( )

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    Select
      case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
      case $msg = $buttonstart
        GUICtrlSetState ($ani1, 1)
        
      case $msg = $buttonstop
        GUICtrlSetState ($ani1, 0)
        
    EndSelect
Wend

Even after changing the angle brackets to quote marks and copying the GUIConstants.au3 file to the same folder as ExAVI.Au3, I got the error listed below.

== Begin Error Msg ================

Line 3 (File "I:\AutoIt3\Beta\050101(us v3.unstable)\Examples\ExAVI.Au3"):

$ACS_CENTER = 1

^ ERROR

Error: Cannot assign values to constants.

== End Error Msg ================

I'm sure some one will tell me how, if I have erred. I hope someone will confirm that I haven't. :D

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

hello, i have jsut compiled the script contained in the help file ie

#include <GUIConstants.au3>

$ACS_CENTER = 1
$ACS_AUTOPLAY = 4
$ACS_TIMER = 8 
$ACS_NONTRANSPARENT = 16

GUICreate ("My GUI Animation",300,200)
$ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10)

$buttonstart = GUICtrlCreateButton ("start",50,150,70,22)
$buttonstop  = GUICtrlCreateButton ("stop",150,150,70,22)

GuiSetState( )

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    Select
      case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
      case $msg = $buttonstart
        GUICtrlSetState ($ani1, 1)
        
      case $msg = $buttonstop
        GUICtrlSetState ($ani1, 0)
        
    EndSelect
Wend

and it works fine.... i am using autoit v3.0.103, i also compiled your script and it works also... tryin installing autoit again or try a different version.

link to v.3.0.103 is: http://www.autoitscript.com/autoit3/files/...it-v3.0.103.exe

Edited by burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hmmmn, I have reinstalled, changed the quotes back to angle brackets, re-downloaded and reinstalled, changed the angle brackets back to quotes, and I still got the same error message. Even after I pasted the contents of GUIConstants.au3 (except for the first line) into the example in place of the include statement, still the error.

When I commented out the lines...

;$ACS_CENTER = 1
;$ACS_AUTOPLAY = 4
;$ACS_TIMER = 8 
;$ACS_NONTRANSPARENT = 16

from the example, it runs OK (compiled or not).

I took out the include file, put the include statement back in, left the 4 lines above commented out, added the path to the include statement and it runs OK. When you do the install, isn't the compiler supposed to know where the include files are?

I'm running Win2K, 256MB RAM, 18+ GB free HD space. There are no registry entries that reference the include folder. Should there be?

#include "C:\Program Files\AutoIt3\Include\GUIConstants.au3"

;$ACS_CENTER = 1
;$ACS_AUTOPLAY = 4
;$ACS_TIMER = 8 
;$ACS_NONTRANSPARENT = 16

GUICreate ("My GUI Animation",300,200)
$ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10)

$buttonstart = GUICtrlCreateButton ("start",50,150,70,22)
$buttonstop  = GUICtrlCreateButton ("stop",150,150,70,22)

GuiSetState( )

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    Select
      case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
      case $msg = $buttonstart
        GUICtrlSetState ($ani1, 1)
        
      case $msg = $buttonstop
        GUICtrlSetState ($ani1, 0)
        
    EndSelect
Wend
Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Share this post


Link to post
Share on other sites

THe pb come from the lastest unstable which have implemented a CONST attribute just remove the $ACS_ definition

I will update the doc. A lot of script will break with this latest unstable.

Thanks :idiot:

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

have u tried removing

;$ACS_CENTER = 1
;$ACS_AUTOPLAY = 4
;$ACS_TIMER = 8 
;$ACS_NONTRANSPARENT = 16

^, altogether and running it, im running, windows xp pro sp 2, 768mb ddr ram

edit: beat me to it jpm :idiot:

Edited by burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

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  
Followers 0