Sign in to follow this  
Followers 0
JackDinn

AI3 updating , is there a trick to this ?

13 posts in this topic

Iv been looking at the _PDH_performanceCounters and wanted to have a play but then i found that i needed to update to AI v3.3.6.0 so iv updated.

Now im in a right muddle, all my scripts are full of errors, all my collected UDF's are also knackered. Iv got global variables that are already declared elsewhere (cant find where) iv got functions within udf's that are already defined but have completely different arguments and maybe even different return values.

Iv only looked at my smallest script which only has 1 udf WinAPIEx.au3 and only uses 1 function from it _WinAPI_GetIdleTime() and thats bad enough, what about my other much bigger programs they use many many udf's

How am i ever going to sort this enormous mess out ?

thx.


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites



Here you can find all script breaking changes.

Depending on your previous version you'll need to "brush up" your scripts.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

How am i ever going to sort this enormous mess out ?

One small step at a time. AutoIt scripts are designed to be backwards compatible over somewhat short periods of time. Say you started development on v3.3.5.0 then you can upgrade to v3.3.6.0 safely. But from the looks of it, you have updated AutoIt from a version somewhere between 2005/2007 to the new 2011 version. Obviously, the longer period of time you update the more things are going to break.

You've missed the huge update with the "UDF revolution", where the developers changed a lot of the existing UDFs and made a lot of the commonly used UDFs part of the standard installation. For example, your WinAPIEx.au3 is now part of standard installation as WinAPI.au3 (I think).

Not a lot of breaking changes were going on in the 2005-2008 period, but since 2009 they have become more frequent. It had to be done because the language was stuck, trying to be backwards compatible while providing new features at the same time - but for that, some existing features just had to be broken.

There is a list of changes and a list of script breaking changes. But I doubt they will do you much good in this situation. What will help ofcourse, is just go back to an old version and "fuck" the new updates like you've done for the past half of the decade.

Edited by Manadar

Share this post


Link to post
Share on other sites

i have already read the script breaking changes. but just knowing whats changed dont really help. Its going to take ages to go through all my scripts and udf's and thats even if i can understand what exactly is going on in them (which i dont in a lot of them, i just use them)

I admit iv always avoided updating exactly because of this problem, i tried a year or so ago and it blew my mind then plus i was busy with a bug in one of my main apps so didn't have the time.

so looking at the udf WINAPIEx.au3

lets start a step at a time :-

ERROR: $LWA_COLORKEY previously declared as a 'Const'

my first error (above) , so ok it been declared elsewhere, in one of the includes (or one of the includes includes ...etc etc) , so do i just rem/delete it and make the assumption that its set to the "correct" (same as before) value ?

next :-

WARNING: $tagTEXTMETRIC: possibly used before declaration.

Local $tTEXTMETRIC = DllStructCreate($tagTEXTMETRIC)

ehh ? why is $tagTEXTMETRIC not declared ? iv not changed anything in this udf, has one of this udf's includes changed its global variables ? if so what is it's value supposed to be ?

iv got 100's of scripts & 100's of udf's and what about all the tutorials and demo code snippets on the forum ?

ooo this is going to be a long week :unsure:


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You might want to try also downloading the version of WinApiEx UDF, which I'm sure doesn't have trivial problems like that anymore.

iv got 100's of scripts & 100's of udf's and what about all the tutorials and demo code snippets on the forum ?

Most developers update their important examples to work for new versions. You can just copy-pasta them. When an example is not updated, someone else usually just updates it for them and posts it somewhere else.

ooo this is going to be a long week

But it's friday! Edited by Manadar

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

what about having 2 installations of AI, the version that iv been using 3.3.0.0 and also the latest ver, possible ?

so just wondering what everyone else does when there's an update, do they go through all there old scripts and udf's to bring them all up to date each time ? i understand there is usually not so much of a problem but still over the years there must have been a few times when people had to check/redo all there stuff and for some thats a lot, or does some stuff just get left behind effectively junked. I never know what i might want in the future.

worse comes to worse i could dedicate one of my comps to the new (or old) version.

EDIT- yea , sorry about seemingly asking a question about something you just answered, was writing as you were posting :unsure:

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

The issue you're facing isn't specific to AutoIt. Even with languages specifications issued by big name consortiums hiring overpaid experts worldwide and working on it for years, you as a user need to face code-breaking changes and even more. Look at the first C++ specs (when C++ was a C preprocessor) and try to match it with today's C++ (not even looking forward) and you'll see what I mean. AutoIt isn't issued by long consortium-like gathering of worlwide experts and relies on a benevolent, spare time, passionate work of various people around. Hence it evolves as time passes by, most of the time taking great care to avoid script-breaking changes but at times they are unavoidable to either fix things or offer new realms of coding power.

Now there are two positions you can choose to cater with a moving target. Leave old stuff "as is" at the risk of obscure or hard to fix bugs in new envionments and accepting the burden that making the script evolve to suit new needs or benefit of new features previously unavailable may reveal very costly. OTOH, you can follow suit at every release and, yes, invest time in modifying your existing script base to better code, fixed bugs and new extensions.

There is a cost (either in money, time, flexibility or lack thereof) involved in each path you choose to take. This cost always was a significant part of the cost of developping software, which unexperienced people (I mean non-professional, I'm not being condescending here) tend to minimize or even ignore altogether. Assuming these costs is why software maintainance in professional IT just can't be free for everyone.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

yea i hear ya and understand the how's and why's , I suppose i was hopping for it being my lucky day and someone said "yea sure there's a script somewhere that will do the upgrading of old code for you" but alas its not my lucky day today :unsure:

O and dont get the impression that im ungrateful for all the hard work and time that goes into AI, I couldn't do without it & im am most appreciative :>.

I would still like to know if it ok to assume that if a global constant has been added somewhere by an update that its is most likely to have the same value as any previous udf's that may have been declaring it ?

Also i take it its not possible to have more than one different version of AI installed on one comp ? (dont look like it to me)

Thx.


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Hi JackDinn,

maybe you want to take a look at the from guinness. This could be a possibility to have two different Versinons.

:unsure:

Edited by Hannes123

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

It is possible to have more than 1 version installed at the same time but you will find it is not worth the effort and grief you can run into down the road. As a matter of fact if you are using the Scite editor you could set the old install as the Beta version for Scite and then use Scite functionality to switch between the two. Again, not worth it. There is so much new functionality since 3.3.0.0 that it is probably well worth taking another look at your code. I'm sure you can find many ways to improve it using some of the newer functions.

EDIT:

To answer your question about constants. They will be the same as before. There may have been a couple added and the files containing them may have changed but the constants themselves have remained constant.

Edited by GEOSoft

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

well im 99% sure i can find ways to improve my scripts with the newer version , it was just looking to do just that that lead me down this path (wanted to read the cpu usage for processes & iv already seen a handful of neat things that i cant wait to play with).

Yea the beta , i was going to mention that it sits along side the stable but as you say it would be better in the long run to just dig in and get my old stock sorted.


Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Share this post


Link to post
Share on other sites

Sooner or later we have to bite the bullet. In my case I did a final compile of everything I needed to still run on the old 9x platforms which are no longer supported. Then I made archive copies of everything else and reopened the ones I wanted to work on as new projects. Just go from there.


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

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