Update: Get Base64 in machine code running in AutoIt. It's about 100 times faster!
Ok so I converted everything I got into UDF friendly code...
Here it is with examples...
You might want to change the smtp server in the INetSmtpMail_Example to a useful one because odds are you dont have a login at USC. And no I wont let you use mine. You also need to populate
$s_FromName = ""
$s_FromAddress = ""
$s_ToAddress = ""
in the example file if you want this to work.
_INetSmtpMail requires _Base64 AND the latest AutoIt BETA!
_Base64 has
Function Name: _Base64Encode(), _Base64Decode(), _BinToDec(), _DecToBin()
Description: Convert: String to Base64, Base64 to String, Binary to Decimal, Decimal to Binary
Tell me if this is good or not, Im going to submit the UDF next week to the beta.
EDIT250% Speed Increase in _Base64! Thank you blindwig for telling me how to speed it up. I also want to thank sylvanie for posting his awesome _BinToDec() & _DecToBin() functions, they are here
http://www.autoitscript.com/forum/index.ph...ost&p=72664In order to help with the speed increase, the only func that throws an error is _Base64Decode()
EDIT7x Speed increase in _base64 from the last time. So something that used to take around 40 seconds in my very first encoder now takes 2 seconds! The decoder is quicker but its still slow.
I also updated the example so you can encode files with it as well. Please let me know if it works. blindwig said that autoit can't handle null characters (binary zero) so try some files out and if they don't work let us know, because i tried a couple and they did work. so we need to do some testing.
EDITSpeed increase in _Base64 Encode again! The Decoder is a lot faster now (3 times faster), and it can handle junk data. Updated _Base64_Example files as well. There are optional parameters now. Thank You blindwig, couldn't have done it without your help!
EDIT_Base64: Small speed boost to the Encoder, Decoder now assumes all data is mixed, with almost no speed penitently (blindwig). Decoder also will not give an array size error when given bad data.
EDIT_Base64: Global variable eliminated with no change in speed. One function gone as well.
EDIT_Base64: Encode/Decode now has a progress bar option. Speed increase to decode function as well. Thanks blindwig!
_Base64_Example: Uses progress bar for one example now
EDIT_Base64_Example: Does a file compare automatically for the encode/decode part. it also overwrites old output files. That means you can run it again and again without having to del the output files, in order to test this UDF.
EDIT_Base64: Encode/Decode speed increase! The larger the file, the more noticeable the difference. Example: 80 seconds to encode a 1.2MB file
EDIT_Base64: Decode speed increase!
Syntax has changed. Encoder is faster as well when using the line return option. Thanks for both speed increases blindwig! bin and dec functions removed. They can be grabbed
here if anyone needs them.
_Base64_Example: Updated to reflect the new decoder syntax.
EDIT_Base64:
Decoder speed increase!
Syntax has changed. It's now back to the old way... yeah sorry about that.
Encoder is faster as well!
_Base64_Example: Updated to reflect the new decoder syntax.
EDIT_Base64: 3 Global variables are used now. The reason for this is speed. If using encode or decode multiple times in a script is should be faster now.
EDIT_Base64: 2 Global variables are used now. Speed increases as well.
EDIT_INetSmtpMail: Syntax Changed to look more like the current UDF one in INet.au3
_INetSmtpMail_Example: Changed to reflect the new syntax. I also added an option to send the email directly to the MX server, but it doesn't seem to work too well. make sure to read the msgbox's carefully.
EDIT_Base64: Encoder and Decoder are faster thanks to blindwig
_INetSmtpMail:
Changed Syntax, Added support to send emails directly from your computer with no smtp server needed.
_INetSmtpMail_Example: Updated to deal with the new functionality & syntax of the UDF.
EDIT_Base64: Fix because of
http://www.autoitscript.com/forum/index.php?showtopic=43881 It only seemed to effect the decoder....?
_Base64_Example: Fixed because of above link, FileOpen() Function has changed.
EDIT_Base64: Code Cleanup, I left in 2 ConsoleWrite functions and #include <Array.au3>. They are now removed. Updated documentation inside the file as well.
-Mikeytown2
OLD
_Base64.au3 13.81KB
880 downloads
_Base64_Example.au3 3.83KB
614 downloadsNEW
_Base64.au3 13.97KB
2183 downloads
_Base64_Example.au3 3.91KB
1618 downloads
_INetSmtpMail.au3 9.23KB
1432 downloads
_INetSmtpMail_Example.au3 4.35KB
1215 downloads
Edited by mikeytown2, 03 August 2008 - 07:51 PM.