Sign in to follow this  
Followers 0
jlandes

Autoit Standard Library

3 posts in this topic

I have submitted the following functions to Jon to include in the standard library. Please test these and let me know what you think. In addition, please provide feedback on variable naming conventions, coding style, return and @error codes, etc. I think it would be beneficial to everyone to be sure that everything for the library is standardized, just like the in-built commands. Here's the list:

#include <Date.au3>

_DateDayOfWeek - Returns the name of the weekday, based on the specified day.

_DateIsLeapYear - Returns 1 if the specified year falls on a leap year and returns 0 if it does not.

_DateLastWeekdayNum - Returns previous weekday number, based on the specified day of the week.

_DateLastMonthNum - Returns previous month number, based on the specified month.

_DateLastMonthYear - Returns previous month's year, based on the specified month and year.

_DateMonthOfYear - Returns the name of the month, based on the specified month.

_DateNextWeekdayNum - Returns next weekday number, based on the specified day of the week.

_DateNextMonthNum - Returns next month number, based on the specified month.

_DateNextMonthYear - Returns next month's year, based on the specified month and year.

#include <File.au3>

_FileAppend - Appends the specified text to a file.

_FileCreate - Creates or zero's out the length of the file specified.

_FileReadToArray - Reads the specified file into an array.

_FileWriteLog - Writes the specified text to a log file.

#include <String.au3>

_StringRepeat - Repeats a string a specified number of times.

_StringReverse - Reverses the contents of the specified string.

I'll be adding more shortly, once I've got some feedback on how things look and test out so far. Thanks.


Sincerely yours,Jeremy Landesjlandes@landeserve.com

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The list looks great! Are these available yet, or do we have to wait for Jon's next AutoIt release?

If I could offer some ideas for additional functions:

_StringCount -- Counts the occurrence of a substring within a string.

_StringInStrLast -- like InStr but returns index of last occurrence

_FileFindTally -- Counts number of files that match the search pattern (trids suggested it)

_DirCopy -- copy a directory

_DirMove -- move a directory

Edit: Look at trid's post here for FileFindTally

Also, you may want to consider (if you haven't already) using Run(@ComSpec & " /c " & 'copy /?') for _Dir functions.

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

I'll see what I can do. Thanks.


Sincerely yours,Jeremy Landesjlandes@landeserve.com

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