Jump to content

What's wrong with the new AutoIt version?


Recommended Posts

#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

#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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...