Sign in to follow this  
Followers 0
Diana (Cda)

[SOLVED] _DateMonthOfYear trouble

5 posts in this topic

#1 ·  Posted (edited)

Upgraded just now to the latest AutoIt version. It's having trouble with the _DateMonthOfYear function that is found in a good many of my scripts. I usu. manage to fix the discrepancies that occur between upgrades but this one I don't know where the problem lies.

Can anyone help with this one? I rely on the dating functions of AI for automated dating of files and folders, etc.

Thanks.

Edited by Diana (Cda)

Share this post


Link to post
Share on other sites



I don't know the function _DateMonthOfYear, but maybe you need the function _DateToMonth coming with AutoIt.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I don't know the function _DateMonthOfYear, but maybe you need the function _DateToMonth coming with AutoIt.

Yeah, I didn't know where that was coming from. It wasn't in the Include (UDF) folder after the upgrade which is what had me stumped.

I ended up reversing the upgrade. I put back my old program files and restored my "Include" folder to what it was, and all my scripts worked again. That prompted me to seach again for this function and, this time, the search for content found it. _DateMonthOfYear was in DATE.AU3 so I'm guessing that since I overwrote the old Include folder, that the new DATE.AU3 doesn't have this.

So, finally, a valuable lesson was learned. I'd stopped updating regularly when each upgrade made a lot of my scripts fail. So from now on I'll initially leave my UDF "Include" folder alone. Then, after manually updating the main files like I always do, then I'll do a file compare between my Include folder and new one and only move completely new non-same-name UDFs over. Then comparing same-named ones will allow me to see any new code that I can integrate with code in same-named older UDFs, hopefully without creating code inconsistencies/incompatibilities. I'm guessing that this won't happen a lot.

Funny how it took this one upgrade to highlight exactly where upgrade problems happened in the past. But that dating function was in too many scripts so I guess that's what easily highlighted the problem. At any rate, I'll test by putting back in the new install files and carefully working with upgrading the Include folder.

Thanks.

Edited by Diana (Cda)

Share this post


Link to post
Share on other sites

Which version of AutoIt were you using before upgrade?

Doesn't the version notes mention anything about this function in some release in between?


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

Which version of AutoIt were you using before upgrade?

Doesn't the version notes mention anything about this function in some release in between?

Maybe it does. But I don't keep up with updates. I have so many applications that if I kept up with updating them all, I'd spend more time doing than working, almost <g>.

Yesterday I went through my old Include folder and the new one and did what I said I'd do. I compared both and copied over all news ones and kept the ones I know that upgrading will break my old scripts and put the newer ones in a separate folder. I think this is going to work better than the just upgrading the folder throwing the old one out. Didn't know any better before. I think that that's the best approach for me. I often go and dl scripts and they often don't work with newer UDFs. This way, it might not be ideal, but I won't have to completely re-write or toss old scripts, I'll just have to add new UDF references when I find the errors they stop at. I know you guys probably have a better way of doing things, but every upgrade sees a ton of my older scripts stop working and functionality is more important to me than perfect code. As long as something works, that's what counts.

So we learn as we go along. Thanks. :x

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