Jump to content

Variable Used Without Being Declared


Recommended Posts

Hi,

Old Autoit user here, starting up for first time again. I have a problem running all example scripts posted.. Every single one says Variable Used Without Being Declared. I'm guessing its just a simple problem that I'm not thinking of. I would post the script but its virtually every script I run. Any suggestions would be great.

Brett

Link to comment
Share on other sites

#include <WindowsConstants.au3>
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

The issue is related to to goldenix's post, although that's not necessarily a catch all. What has happened is a reformat of the include files. Before 3.2.12.0 the file GUIConstants.au3 used to have 10 or so other includes within it, and a lot of users were using that file because it covered a lot of different constants. The issue with that is that it was loading a lot of unneeded information. We had people writing a script with a simple GUI window with no controls including GUIConstants.au3 for just a few variables like $GUI_EVENT_CLOSE or $WS_POPUP, but they were actually loading up like 1000+ other variables that they weren't using. So what the developers did was pruned GUIConstants down to just the barest GUIConstants (like $GUI_EVENT_CLOSE, $GUI_DOCKALL, etc), and if you need the other constants, you include them specifically (Need $WS_POPUP? Include WindowsConstants.au3. Need $ES_READONLY? Include EditConstants.au3). The issue with this is that a lot of people can't be bothered to update code for the new standards and either don't update their AutoIt versions, or they do something silly like edit the GUIConstants.au3 to be the way it used to be (I've seen this once or twice). What I've done myself is I created an extra include file that includes everything, that I called AllConstants.au3 which I use primarily when testing other people's old/lazy code.

Hopefully that helped to explain the problem you're having.

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