
The AutoItObject team is proud to announce that the first version of our AutoItObject UDF is complete and ready to use.
The project page is located at [currently missing]
Please, report bugs and any other issues at our [currently missing], and not here.
An overview of all the functions can be found in the online documentation [currently missing] or in the offline .chm documentation file which is included with the [currently missing].
If Origo has problems providing the download, the current version will be mirrored here
The UDF requires the current AutoIt version v3.3.4.0!
AutoItObject 1.2.8.2.exe 413.04K
277 downloads
AutoItObject 1.2.8.2.zip 239.04K
1591 downloadsPlease, leave your comments and experiences here.
Regards,
- trancexx
- ProgAndy
- monoceres
- Kip
Our work is published under the Artistic License 2.0
A copy of the FAQ to answer your most urgent questions right away: (can also be found at the online documentation:
Some helper-functions:Q. What is Object Orientation and why do I need it?
OO is a highly used programming paradigm that is widely used in many programming languages. In procedural programming (AutoIt, C, etc.) you pass around data to different functions. In OO however, you use objects that contains both the function and data. It's especially useful when dealing with larger projects and need to structure your code. OO also offers tools such as inheritance to save yourself from rewriting code.
Q. How does this work? AutoIt already has support for COM objects. What this library does is it creates dynamic com objects during runtime that executes AutoIt code.
Q. How does this affect my script performance wise? There is a minor speed difference between calling methods and calling functions directly. However the difference is minor and you'll probably never notice it. When execution reaches AutoIt code it continues at normal speed.
Q. Does the library support inheritance? Yes. _AutoItObject_Create() has an optional $parent parameter.
Q. What about multiple inheritance? No problems. Calls to _AutoItObject_Create() can be nestled.
Q. Why isn't it possible to pass arguments as ByRef to methods? This is a limitation within AutoIt. It's not possible to overcome this problem by directly calling the member functions, but that goes against the OO thinking and will not be covered here (use common sense).
Q. Why can't I use variables of ptr-type in arguments to methods? See previous answer.
Q. Can I use arrays as properties? Yes. However, it's slower than usual.
Q. Does this mean that the objects I create are available from other programs since they're actually COM-objects? No. The objects are created at runtime and for AutoIt's eyes only.
Q. My GUI freezes! Why and how do I fix it? All methods are essentially dllcallbacks. Unfortunately this means that messages are not processed while your methods are being executed. As long as you keep your main loop outside any method, you'll be fine.
When using the Wrapper, this are some simple methods to get a return value from the resulting array.
; #FUNCTION# ==================================================================================================================== ; Name...........: _AIOResult ; Description ...: Returns the return value of the Call to a WraperObject function ; Syntax.........: _AIOResult(Const $aResult [, $vError=0] ) ; Parameters ....: $aResult - the resulting array ; $vError - [optional] value to be returned if result is no array (default: 0) ; Return values .: Success - Returnvalue ($aResult[0]) ; Failure - $vError, @error set to 1 ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; ; =============================================================================================================================== Func _AIOResult(Const $aResult, $vError=0) ; Author: Prog@ndy If IsArray($aResult) Then Return $aResult[0] Return SetError(1,0,$vError) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _AIOParam ; Description ...: Returns the parameter value of the Call to a WraperObject function ; Syntax.........: _AIOParam(Const $aResult, $iParam, $vError=0) ; Parameters ....: $aResult - the resulting array ; $iParam - The parameterindex to return (0: result, 1: first parameter, 2: 2nd parameter, ...) ; $vError - [optional] value to be returned if result is no array (default: 0) ; Return values .: Success - Parameter value ; Failure - $vError, @error set to 1 ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; ; =============================================================================================================================== Func _AIOParam(Const $aResult, $iParam, $vError=0) ; Author: Prog@ndy If UBound($aResult)-1 < $iParam Then Return SetError(1,0,$vError) Return SetExtended($aResult[0], $aResult[$iParam]) EndFunc
Edited by ProgAndy, 10 September 2012 - 02:37 PM.











