Jump to content
Sign in to follow this  
Info

What's wrong with the new AutoIt version?

Recommended Posts

Info

#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? :)

Share this post


Link to post
Share on other sites
PsaltyDS

#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

Share this post


Link to post
Share on other sites
Info

Thanks :)

Edited by Info

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.