Info Posted May 17, 2008 Share Posted May 17, 2008 #include <GUIConstants.au3> $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,$WS_POPUP) GUISetState(@SW_SHOW,$MainGUI) While 1 $m = GUIGetMsg() Switch $m Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I'm getting: Variable used without being declared.: $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,$WS_POPUP) $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,^ ERROR >Exit code: 1 Time: 0.339 In my other computer I got an older version of AutoIt and that script is working fine... Help? Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 17, 2008 Administrators Share Posted May 17, 2008 http://www.autoitscript.com/autoit3/docs/s...ing_changes.htm Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 17, 2008 Share Posted May 17, 2008 (edited) #include <GUIConstants.au3> $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,$WS_POPUP) GUISetState(@SW_SHOW,$MainGUI) While 1 $m = GUIGetMsg() Switch $m Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I'm getting: Variable used without being declared.: $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,$WS_POPUP) $MainGUI = GUICreate("",@desktopwidth,@DesktopHeight,0,0,^ ERROR >Exit code: 1 Time: 0.339 In my other computer I got an older version of AutoIt and that script is working fine... Help? Add #include <WindowsConstants.au3> to your script. A design decision was made by Devs to break out the nested #include files so that less unused code is loaded at compile/run time. If you open the Beta help file and go to the entry for GuiCreate(), then click on the Styles link you will see at the top of each table of constants the #include file that contains them. A little more work for the scripter, to get a more efficient script in the end. Doh! Beat out by the man himself! Edited May 17, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Info Posted May 17, 2008 Author Share Posted May 17, 2008 (edited) Thanks Edited May 17, 2008 by Info Link to comment Share on other sites More sharing options...
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