Gene Posted January 3, 2005 Posted January 3, 2005 (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. Oh, if this should be in the BUGS section... I tried there, but wasn't allowed to. #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 WendEven 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^ ERRORError: 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. Edited January 3, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...
buzz44 Posted January 3, 2005 Posted January 3, 2005 (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 Wendand 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 January 3, 2005 by burrup qq
Gene Posted January 3, 2005 Author Posted January 3, 2005 (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 January 3, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...
jpm Posted January 3, 2005 Posted January 3, 2005 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
buzz44 Posted January 3, 2005 Posted January 3, 2005 (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 Edited January 3, 2005 by burrup qq
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