Dynamic Link Libraries (DLL)
User Defined Functions (UDF)
GUI Stuff
Other Stuff

Function for detect unicode type of file

While it's no generally need in case of ANSI and UTF-16 type, those files will open with unicode version of Autoit without problem, UTF-8 files without BOM (byte order mark) will cause Autoit open them as ANSI.

This function tries to detect if file that looks as ANSI is really ANSI or UTF-8. This done by checking for UTF-specific sequences. As referred in Wikipedia "The chance of a random sequence of bytes being valid UTF-8 and not pure ASCII is 3.1% for a 2 byte sequence", so this method is fairly safe. After determening that file is UTF-8 it's possible to read it as binary and convert to string with BinaryToString function.

Note, atm this function don't work with 3 and 4 byte sequences, that usually hold hieroglyphic symbols.

$nResult = _GetUnicodeType($sFileName, $nReadSize = -1)
Parameters
$sFileNamefile to check
$nReadSizesize in bytes to read from file
More bytes - more reliable result, but longer processing, by default read full file.
Return value
$nResult0 - ANSI
1 - UTF-8
2 - UTF-16
4 - UTF-32
On error
$nResult = -1Not supported file with 3 and 4 byte sequences.

History

2008-02-18 - 1.0 - Initial (public) release.

Downloads

Download - Latest version


Direct DBF reader

This is an UDF for direct reading data from DBF tables to 2D array. Not the fastest thing on the world, but probably it's not possible to done it's faster in Autoit.
Benchmark: 5 Mb file with 6 fields and about 92000 records took about 13 seconds to load on Athlon 64 3000+.
Note: not always possible check if DBF have incorrect header data, so this most likely will crash on corrupt DBF files.

$aData = _FileReadDBF($sFileName)
Parameters
$sFileNameDBF table file name
$nFlags1 - convert from OEM to ANSI
2 - strip leading and trailing witespaces
Return value
$aData2D array, first row - names of fields
On error
No decent way. 

History

2009-12-14 - 0.3 - Fixed gap handling, now reading any file should be correct.
2007-10-24 - 0.2 - Initial release.

Downloads

Download - Latest version


Images info reader

This is an UDF for reading info from JPEG, TIFF, BMP, PNG and GIF - size, color depth, resolution etc. For JPEG files UDF also retreive various Exif information.

$sInfo = _ImageGetInfo($sFile)
Parameters
$sFileImage file name
Return value
$sInfoString with image parameters
On error
$sInfoEmpty string - no info was found/wrong format
@error = 1Can't open image file

History

08.10.10 - 2.8 - Fixed handling of tEXt block for PNG (thanks KaFu)
29.04.10 - 2.7 - Fixed _ImageGetParam function (thanks wolfbartels)
21.01.10 - 2.6 - Fixed deprecated struct types
25.01.08 - 2.5 - Fix for JPEG size bug, caused by newly added struct aligning feature (thanks NeoFoX)
22.05.07 - 2.4 - With new Autoit version script become unworkable, fixed, thanks Tweaky and someone on German forum
25.05.06 - 2.3 - Fix of bug, caused by binary string changes (thanks odklizec)
03.04.06 - 2.2 - Fixed JPEG dimensions for certain files (thanks billmez)
19.02.06 - 2.1 - Updated to current beta (no DllStructDelete anymore)
17.10.05 - 2.01 - Tiny fixes, underscores prevent run script in latest betas.
01.07.05 - 2.0 - Initial version.

Downloads

Download - Latest version


SysIPAddress32 control wrapper

Allow create SysIPAddress32 control in Autoit GUI and work with it, supported all functions: reading, writing, clearing, focusing, setting range.

Note: this control require COMCTL32.DLL library v4.71 or newer (come with IE4.0+)

History:
25.05.06 - 1.02 - Added forgotten styles.
11.05.06 - 1.01 - Small DllStruct fix.
31.05.05 - 1.00 - Initial version.

Download

Gradient "control"

Create gradient "control". Archive includes 2 versions - for Autoit 3.104 beta (preferable) and for old version, based on labels (resource consuming).

History:
 1.0 - Initial version.

Download

Direct RTF writer

UDF create empty RTF document and append formatted text. Allow describing font, size, color and style. Note that UDF at very early stage, so working only with the self-created documents is allowed (no general parser). Parameters for functions are described in the UDF, example included.

History:
 0.1 - Initial version.

Download

Images size reader

This is an UDF for reading size of JPEG, TIFF, BMP, PNG and GIF. This include JPEG size reader as its part.

$aSize = _ImageGetSize($sFile)
Parameters
$sFileImage file name
Return value
$aSize[0]Width of image
$aSize[1]Height of image
On error
$aSizeEmpty string
@error = 1File is not valid image or info not found

History

15.03.05 - 1.1 - Cleaned up code, removed generic TIFF fields parser, changed naming.
18.08.04 - 1.0 - Initial version.

Downloads

Download - Latest version




MP3 Tag reader

UDF retrieve tags from MP3. Finds and retrieves info from the v1, v1.1 and v2.x tags. Possibly will work with other files (not MP3) uses ID3V2 tags. For v2 tags UDF also try to extract record length, that may be helpfull to determine length of VBR files.

$aInfo = _MP3GetTag($sFile)
Parameters
$sFileFile name
Return value
$aInfo[0]Title
$aInfo[1]Performer
$aInfo[2]Album
$aInfo[3]Year
$aInfo[4]Comment
$aInfo[5]Track number
$aInfo[6]Genre
$aInfo[7]Length
$aInfo[8]Tag version
On error
$aInfoEmpty string
@error = 1Information not found

History

06.05.06 - 2.5.1 - Refinements due Ubyte array fixes in Autoit (so now UDF will work only in Autoit 3.104.123+).
04.05.06 - 2.5 - Added support for unicode and UTF-8 tags, function now can return tag version.
17.06.05 - 2.0 - Fully rewritten with DllStruct abilities, much faster now. Also fixed number of bugs.
25.04.05 - 1.1 - Fixed lockups on certain files (thanks Burrup), correct handling language codes in comments.
30.12.04 - 1.0 - Initial version.

Downloads

Download - Latest version 2.5.1, required Autoit 3.104.123+ Beta



MP3 info reader

UDF retrieve basic MP3 information: MPEG version, Layer, Bitrate, Frequency, Channel Mode, Duration (time and frames), CRC, Copyright and Original flags. Also works woth the MP2 and MPA files, because they all in one standard.
Unfortunately, I don't know how to get length of VBR files. And I not sure, that VBR check I used is correct.

$aInfo = _GetMP3Info($file)
Parameters
$fileFile name
Return value
$aInfo[0]MPEG version
$aInfo[1]Layer
$aInfo[2]Bitrate
$aInfo[3]Frequency
$aInfo[4]Channel Mode
$aInfo[5]Track duration
$aInfo[6]Frames
$aInfo[7]CRC Protected?
$aInfo[8]Copyrighted?
$aInfo[9]Original?
On error
$aInfoEmpty string
@error = 1Information not found

History

30.12.04 - 1.2 - Just little tweak for more correct retieving V2 tags size, this should give speedup on some files.
29.08.04 - 1.1 - Now should work with files contain corrupt first frames.
27.08.04 - 1.0 - Initial version.

Downloads

Download - Latest version


Made by YDY (Lazycat)   Last updated: 29 April 2010