找回密码
 加入
搜索
查看: 2608|回复: 9

[AU3基础] 新版au3

  [复制链接]
发表于 2016-10-24 14:31:11 | 显示全部楼层 |阅读模式
如题,有没有关于  au3 新版和老版区别 的总结 链接
发表于 2016-10-24 14:37:51 | 显示全部楼层
在官网里是不是可以看到  更新内容!
发表于 2016-10-24 15:02:41 | 显示全部楼层
[code]最新版本的脚本重大更改
此页面描述所有最近所做的更新. 几乎肯定会 破坏现有脚本 的正常运行. 当你打算升级 AutoIt 时, 请仔细阅读本清单, 如果这些修改影响到你的脚本, 则你将 需要修改你的脚本.

v3.3.14.0
AutoIt:

If Min and Max are the same value then Random() will now return that value and the @error flag will no longer be set. 
Under Vista or Server 2008 _GDIPlus_Startup() need explicit Dll for GDI+ v1.1 support. 
File operations on text files not opened with FileOpen() and explicit unicode flags now auto-detect encoding slightly differently to be more in line with modern editors. This includes all file functions that are used with a filename, for example FileRead("filename.txt"). Specifically: 
Files containing a BOM will be opened in the relevant mode as per that BOM. UTF-8 and UTF-16 BOMs are checked. 
UTF-8 and UTF-16 files without a BOM will be automatically detected and opened in the relevant mode. 
Files containing nulls are opened in Binary ($FO_BINARY) mode by default (unless they are detected as valid UTF-16). Previously they would be opened in ANSI mode. Use the $FO_ANSI flag to override. 
Files containing only characters 1-127 are opened in UTF-8 with no BOM ($FO_UTF8_NOBOM) mode by default. Previously they would be opened in ANSI mode. Use the $FO_ANSI flag to override. 
Files containing only characters 1-255 are opened in ANSI ($FO_ANSI) mode by default. 
Due to the above FileGetEncoding() now returns 512 ($FO_ANSI) or 256 ($FO_UTF8_NOBOM) instead of 0 which was undocumented but indicated ANSI. 
New files are written in UTF-8 with no BOM ($FO_UTF8_NOBOM) mode by default. Use FileOpen() to override. 
UTF-16 files without a BOM are now automatically detected in most cases. 
UDFs:

Excel UDF, function _Excel_BookOpen: When parameter $bReadOnly = False and read-write access could not be granted @error was set to 4 and the Workbook was opened read-only. Now @error = 0, @extended = 1 and the Workbook is opened read-only. 
Word UDF, function _Word_DocOpen: When parameter $bReadOnly = False and read-write access could not be granted @error was set to 4 and the document was opened read-only. Now @error = 0, @extended = 1 and the document is opened read-only. 
v3.3.12.0
UDFs:

The parameter $hPrintCallback (formerly $sPrintCallback) in _SQLite_Startup() now requires a function object rather than a function string. This is due to the usage of Call() being removed from the UDF. 
The parameter $hFunctionCall (formerly $sFunctionCall) in _FTP_ProgressDownload() and _FTP_ProgressUpload() now requires a function object rather than a function string. This is due to the usage of Call() being removed from the UDF. 
_ArrayDelete() sets @error to non-zero if $iElement is out of bounds. Please see documentation for more details. 
_StringBetween() change in behaviour and parameter order change. Please see documentation for more details. 
_GUICtrlListView_GetView() and _GUICtrlListView_SetView() were using 0 for detailed view and 1 for large icon view, when it's 0 for large icon view and 1 for detailed view. 
Array UDF was re-written. Functions and/or parameters have been changed, removed or added. A detailed list can be found here. 
Excel UDF was re-written. Functions and/or parameters have been renamed, removed or added. A detailed list can be found here. 
Missing information from the v3.3.10.0 notes:

_ArrayDisplay() re-written with additional parameters. Please see documentation for more details. 
v3.3.10.1
UDFs:

Missing information from the v3.3.10.0 notes:

$tagBITMAPINFO fields changed by using the prefix of "bi". 
v3.3.10.0
AutoIt:

The return value of ShellExecute() has now changed. Instead of returning 1, it returns the PID of the executed process or -1 if no PID exists. 
UDFs:

_Iif() documentation has been removed. The function is still present in Misc.au3, but may be removed at a later date. Scripts should be updated to use ternary operators instead. 
_IEErrorHandlerRegister() has been removed. It's not required due to COM errors no longer being fatal. 
_StringEncrypt() documentation has been removed. The function is still present in String.au3, but may be removed at a later date. Scripts should be updated to use the Crypt functions instead.
Look at _Crypt_EncryptData() for an example of an alternative _StringEncrypt. 
_StringReverse() documentation has been removed. The function is still present in String.au3, but may be removed at a later date. Scripts should be updated to use the native function StringReverse() instead. 
With the introduction of WinAPIEx functions some constants of Constants.au3 include file have been moved to WinAPIConstants.au3. 
Word UDF was re-written. Functions and/or parameters have been renamed, removed or added. A detailed list can be found here. 
$tagGDIPPENCODERPARAMS removed, use $tagGDIPENCODERPARAMS. 
$tagGDIPENCODERPARAMS use $tagGDIPENCODERPARAM as a first structure of the array. 
$tagGDIPENCODERPARAM "count" field renamed in "nbOfValues". 
$tagBITMAPINFO fields changed by using the prefix of "bi". 
_ArrayUnique() re-written with improved speed. The final parameter is used to select whether to return count of returned strings in $aArray[0] 
ToolTip UDF was re-written. Functions and/or parameters have been renamed, removed or added. A detailed list can be found here. 
_ArrayDisplay() re-written with additional parameters. Please see documentation for more details. 
v3.3.8.0
AutoIt:

ObjName() has had a number of bug fixes and changes that may affect data returned. Built-in UDFs have been changed to accommodate this but custom scripts may need to be edited. 
ObjEvent() AutoIt.Error objects no longer have Raise() or Clear() methods and the properties are read-only. 
Int() and Hex() no longer set @error. 
COM methods now require parenthesis so the language can internally detect properties versus methods easier. 
v3.3.6.0
UDFs:

_DateToDayOfWeekISO returned 0-6 and is changed to 1-7 where Monday = 1. 
v3.3.4.0
Some of the following features are deprecated. Deprecated features are no longer documented but continue to work. Deprecated features will be removed after version 3.3.4.0. It is strongly recommended that scripts relying on deprecated features be updated to work with the new behavior. Some features have already been removed and will be noted as such.

AutoIt:

The raw reading mode for FileOpen() has been removed. 
InetGet("abort"), @InetGetActive and @InetGetBytesRead have been removed. The following list shows the new functions used to access the old behavior: 
InetGet("abort") - Calling the new InetClose() function with a handle returned from InetGet() will abort a download. 
@InetGetActive - Calling the new InetGetInfo() function with no parameters returns a count of active downloads. 
@InetGetBytesRead - Calling the new InetGetInfo() function with a handle returned from InetGet()will return the bytes read (and more) for a download. 
AdlibEnable() and AdlibDisable() have been removed. See the new functions AdlibRegister() and AdlibUnRegister(). 
OnAutoItStart() has been removed. See the new pre-processor statement #OnAutoItStartRegister. 
OnAutoItExit() has been removed. See the new functions OnAutoItExitRegister() and OnAutoItExitUnRegister(). 
v3.3.2.0
Some of the following features are deprecated. Deprecated features are no longer documented but continue to work. Deprecated features will be removed after version 3.3.2.0. It is strongly recommended that scripts relying on deprecated features be updated to work with the new behavior. Some features have already been removed and will be noted as such.

AutoIt:

ShellExecute() and ShellExecuteWait() no longer use the "open" verb by default. See the remarks section for those functions for more details. 
The return value of InetGet() has changed. It is important to read and understand the changes because it is possible to leak resources if InetGet() is used incorrectly. 
InetGet("abort"), @InetGetActive and @InetGetBytesRead are now deprecated. The following list shows the new functions used to access the old behavior: 
InetGet("abort") - Calling the new InetClose() function with a handle returned from InetGet() will abort a download. 
@InetGetActive - Calling the new InetGetInfo() function with no parameters returns a count of active downloads. 
@InetGetBytesRead - Calling the new InetGetInfo() function with a handle returned from InetGet()will return the bytes read (and more) for a download. 
The FtpBinaryMode option set with AutoItSetOption() has been removed. Now InetGet() takes a flag to specify the transfer mode. 
The URLDownloadToFile() alias for InetGet() has been removed. 
AdlibEnable() and AdlibDisable() are deprecated. See the new functions AdlibRegister() and AdlibUnRegister(). 
OnAutoItStart() is deprecated. See the new pre-processor statement #OnAutoItStartRegister. 
OnAutoItExit() is deprecated. See the new functions OnAutoItExitRegister() and OnAutoItExitUnRegister(). 
The AutoItSetOption() option OnExitFunc has been removed. See the new functions OnAutoItExitRegister() and OnAutoItExitUnRegister(). 
GUICreate() with $WS_EX_MDICHILD has been fixed to be relative to client area as documented. 
ProcessWait() now returns a PID instead of 1 on success. 
WinWait(), WinWaitActive(), WinActivate(), WinActive() and WinMove() now return an HWND instead of 1 on success. 
The macro @YDAY now uses the range 001 - 366 instead of 1 - 366. This makes the macro more consistent with other languages (like C/C++) and more consistent with all other date related macros which return strings with leading 0s to pad the length. 
RegEnumKey() and RegEnumVal() now return an empty string instead of an error message. 
UDFs:

The last optional parameter for _StringBetween() has been removed. 
_StringAddThousandsSep() has been removed. There are too many opinions on what this function should do and too many revisions of this function have been made. 
_SQLite_SaveMode() has been renamed to _SQLite_SafeMode(). 
v3.3.0.0
AutoIt:

Windows 9x and Windows NT 4.0 Operating System support has been removed. Use v3.2.12.1 of AutoIt if you really need this. 
@ProcessorArch changed to @OSArch as it was misleading. 
RegRead() and RegWrite() no longer use hex strings for REG_BINARY types - native binary datatypes are enforced. 
AutoItX:

The native version of the DLL now exclusively uses Unicode strings (LPWSTR and LPCWTSR). If you really need ANSI strings then continue to use v3.2.12.1. The easiest workaround though is to use a "wrapper" function to simply convert between Unicode and ANSI. A limited selection of functions (WinWait... and Send) have an ANSI version but it is not intended to add ANSI versions for any others unless there is a large demand. 
v3.2.12.0
AutoIt:

RunAsSet() has been removed. Use the new RunAs() and RunAsWait() functions instead. They have been enhanced with slightly better security (It is still not recommended to store important passwords in your scripts) and more functionality. 
The option RunErrorsFatal has been removed. Run(), RunWait(), ShellExecute() and ShellExecuteWait() now all set @error when they fail to run the application. AutoIt will no longer throw a fatal error when an application fails to run. 
StdoutRead(), StderrRead() and ConsoleRead() have undergone significant changes. They no longer block, they return immediately. The parameters have changed as well. It's no longer possible to read count parameters. The peek parameter has moved to the second parameter. The third parameter now specifies you want the data to be returned in binary format (default is text). The macro @extended now holds the number of bytes/characters read. 
StdinWrite(), ConsoleWrite() and ConsoleWriteError() will now behave differently when given binary data. The binary data is written as-is instead of converting it to a string. Also, the return value from these functions is the number of bytes written instead of a generic value of 1. 
Removed: ColorMode option ( Opt() ). 
Fixed: Random(Min,Max,1). Previously this would never actually return Max, so if Max was artificially incremented by one the script will now need to be changed. 
UDFs:

(Please see this forum thread for more details and help with these changes.) 
GUIConstants.au3 is identical to GUIConstantsEx.au3. This means that many scripts using advanced GUI functionality will need to use additional #include statements to include files containing constants that were previously and erroneously included. 
GUIDefaultConstants.au3 no longer exists. You must now #include the corresponding individual constants file for the control type you need. For example, ListBoxConstants.au3, ComboConstants.au3, EditConstants.au3, etc. 
_ArrayCreate() documentation has been removed. The function is still present but may be removed at a later time. Scripts should be updated to use the array initialization syntax built into AutoIt. 
v3.2.10.0
AutoIt

DllCall(): short_ptr, long_ptr, int_ptr types deprecated. Use short*, long* and int* respectively. 
UDFs

_GUICtrlXXXYYY() have been renamed _GUICtrlXXX_YYY() without any functional changes. 
[/code]

评分

参与人数 1金钱 +15 收起 理由
lovyinglog + 15

查看全部评分

发表于 2016-10-24 15:57:12 | 显示全部楼层
回复 3# haijie1223


       高大上的说明~
发表于 2016-10-24 19:51:57 | 显示全部楼层
我现在是只用最新版!不然我就要彻底晕菜.....
发表于 2016-10-26 11:10:25 | 显示全部楼层
我还以为有新的版本呢。很长时间没有更新了
发表于 2016-10-26 13:28:50 | 显示全部楼层
不是新版呢
 楼主| 发表于 2016-10-26 18:45:23 | 显示全部楼层
有没有中文版的呢?
发表于 2016-10-28 23:53:51 | 显示全部楼层
现在不打算用新东西
发表于 2016-10-31 16:35:33 | 显示全部楼层
全是E文,不会啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-22 14:48 , Processed in 0.076193 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表