Sign in to follow this  
Followers 0
Diana (Cda)

[Resolved] I updated UDFs but now get an error ...

6 posts in this topic

#1 ·  Posted (edited)

Because I use AI as a portable app and don't install, I dl the latest version and updated the UDFs by merely extracting and overwriting. I've checked and I have all the UDFs in my include folder that the script requests, it's just that I now get an error on a file that has never had an error before.

It says this:

---------------------------
AutoIt Error
---------------------------
Line 32  (File "L:\AutoIt\APP- AutoIt\0-  Scripts\SHORTCUT- create FF shortcut (desktop,PromptsName+URL) home.au3"):

$h_GUI = GUICreate($shortcutTo,$i_GUIWidth,$i_GUIHeight,(@DesktopWidth - $i_GUIWidth)/2,(@DesktopHeight -$i_GUIHeight)/2,$WS_CAPTION + $WS_SYSMENU)
$h_GUI = GUICreate($shortcutTo,$i_GUIWidth,$i_GUIHeight,(@DesktopWidth - $i_GUIWidth)/2,(@DesktopHeight -$i_GUIHeight)/2,^ ERROR

Error: Variable used without being declared.
---------------------------
OK   
---------------------------
I didn't write the script so can't figure out how to fix. This has worked forever until I did this overwrite and am wondering how it could go wrong when all I did was update the UDFs in my folder. Anyone know what this symptom means and how to fix? It worked before, the script shouldn't need fixing, it's just to figure out what's happened.

Thanks. <g>

Edited by Diana (Cda)

Share this post


Link to post
Share on other sites



@Diana

Maybe...

#Include <WindowsConstants.au3>

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Because I use AI as a portable app and don't install, I dl the latest version and updated the UDFs by merely extracting and overwriting. I've checked and I have all the UDFs in my include folder that the script requests, it's just that I now get an error on a file that has never had an error before.

It says this:

---------------------------
AutoIt Error
---------------------------
Line 32  (File "L:\AutoIt\APP- AutoIt\0-  Scripts\SHORTCUT- create FF shortcut (desktop,PromptsName+URL) home.au3"):

$h_GUI = GUICreate($shortcutTo,$i_GUIWidth,$i_GUIHeight,(@DesktopWidth - $i_GUIWidth)/2,(@DesktopHeight -$i_GUIHeight)/2,$WS_CAPTION + $WS_SYSMENU)
$h_GUI = GUICreate($shortcutTo,$i_GUIWidth,$i_GUIHeight,(@DesktopWidth - $i_GUIWidth)/2,(@DesktopHeight -$i_GUIHeight)/2,^ ERROR

Error: Variable used without being declared.
---------------------------
OK   
---------------------------
I didn't write the script so can't figure out how to fix. This has worked forever until I did this overwrite and am wondering how it could go wrong when all I did was update the UDFs in my folder. Anyone know what this symptom means and how to fix? It worked before, the script shouldn't need fixing, it's just to figure out what's happened.

Thanks. <g>

In the latest stable AutoIt version (3.2.12.1), the Global Constants have been re-organized in the include files.

Your error is pointing to the variable, $WS_CAPTION. which is declared in the WindowsConstants.au3 include file.

So add

#Include <WindowsConstants.au3>

at the top of your script you are running (home.au3), as FireFox suggested.

Should another "Error: Variable used without being declared." message appear, notice where the " ^ ERROR " is pointing to in the line above it. It should be pointing to the beginning of the variable which needs to be declared in the script you are running.

Share this post


Link to post
Share on other sites

@Malkey

There are manythings as you said that I think Diana knows... (member 2,000+ and 500+ replys :) )

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

In the latest stable AutoIt version (3.2.12.1), the Global Constants have been re-organized in the include files.

Your error is pointing to the variable, $WS_CAPTION. which is declared in the WindowsConstants.au3 include file.

So add

#Include <WindowsConstants.au3>

at the top of your script you are running (home.au3), as FireFox suggested.

Should another "Error: Variable used without being declared." message appear, notice where the " ^ ERROR " is pointing to in the line above it. It should be pointing to the beginning of the variable which needs to be declared in the script you are running.

Malkey, 3.2.12.1 is not the latest release version. See the site announcements.

Diana, have a look at the Script breaking changes page in the help file


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

In the latest stable AutoIt version (3.2.12.1), the Global Constants have been re-organized in the include files.

Your error is pointing to the variable, $WS_CAPTION. which is declared in the WindowsConstants.au3 include file.

So add

#Include <WindowsConstants.au3>

at the top of your script you are running (home.au3), as FireFox suggested.

Should another "Error: Variable used without being declared." message appear, notice where the " ^ ERROR " is pointing to in the line above it. It should be pointing to the beginning of the variable which needs to be declared in the script you are running.

Thank you! I didn't realize that that sort of thing happened for sure, though obviously something changed within the UDFs since I did nothing to the script itself. First time I've "updated" the include folder at all when a bunch of new scripts that I was trying off the forum wouldn't work (incl. Paulie's Beep Music one).

Thanks for making me think of a different approach, too. I hadn't figured out how to use that knowledge for scripts others have done re referencing the UDFs (no problems for my own, of course). Seems so very obvious now in hindsight <sigh>. I fixed this one _and_ I could finally get Paulie's to work. I was stumped for a moment when 3 UDFs came up but then just added them one by one to Paulie's Beep Music script until it worked.

Thanks for being so kind. I know it all seems so easy to many of you, but for me it isn't always (though progressively getting easier by fair to good increments now), which many here don't understand. The difference between me and others: I _am_ a computer power user though weak in "programming"; and I persevere long after others give up. Many of you will laugh (and you know who you are) but I am the most knowledgeable person in my sphere about computer software, and they all come to me with questions on how to do things which I can 99% of the time can answer so that they can resolve their problem (okay, meanies, pick yourselves off the floor, I _get_ that you think that's funny!). <g>

So thanks once again! I shouldn't have trouble with this particular issue again now that I will update the UDFs regularly. Phew! <g>

Edited by Diana (Cda)

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  
Followers 0