Hi,
i have a problem with AutoitObject UDF.
I want to call a methode with one or more parameter as ByRef. Inside the methode it works properly, but the ByRef-variable itself will not change value.
Any ideas?
i have a problem with AutoitObject UDF.
I want to call a methode with one or more parameter as ByRef. Inside the methode it works properly, but the ByRef-variable itself will not change value.
Any ideas?
[ autoit ]
#include <AutoItObject.au3> _AutoItObject_Startup() $oTest = _CreateObjFunc('Test') $a1 = 5 ConsoleWrite('Return Methode = ' & $oTest.Meth($a1, 3, 5) & ' [OK]' & @LF) ConsoleWrite('ByRef "$a1" after methode-call = ' & $a1 & ' [FAIL]' & @LF) ; == parameter $a1 was changed inside methode - but $a1 is'nt changed after call ;------------------------------------- OBJECT ------------------------------------------------------ Func _CreateObjFunc($_sName) Local $oSelf = _AutoItObject_Create() _AutoItObject_AddMethod($oSelf, 'Meth', "_Meth") Return $oSelf EndFunc Func _Meth(ByRef $oSelf, ByRef $A, $B, $C) $A += $B + $C Return $A EndFunc ;---------------------------------------------------------------------------------------------------