Script Breaking Changes in Recent Versions
此頁(yè)面包含所有最近所做的更新. 幾乎肯定會(huì)破壞現(xiàn)有的腳本.
升級(jí)時(shí)請(qǐng)仔細(xì)閱讀本清單. 如果這些問(wèn)題影響到你, 則你將需要修改腳本
30th July, 2011 - 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 accomodate this but custom scripts may
need to be edited.
7th
March, 2010 - v3.3.6.0
UDFs:
- _DateToDayOfWeekIso returned 0-6 and is changed to 1-7 where
Monday = 1.
15th January, 2010 - 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().
18th December, 2009 - 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().
24th December, 2008 - 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.
UDFs:
16th May, 2008 - 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.
25th November, 2007 - 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 see UDF
renaming.