Sign in to follow this  
Followers 0
BruceCopperField

Object for _IEFormElementSetValue() By Reference or Value

2 posts in this topic

Most of the function definitions in <IE.au3> are using ByRef for the object reference e.g. _IEFormElementSetValue ( ByRef $o_object, .....). So if I got an object returned by _IEGetObjById() and want to pass it to _IEFormElementSetValue (), is it a must to use ByRef in all my intermediate function parameters passing the $o_object reference ? Since _IEFormElementSetValue () is expecting a ByRef $o_object.

Share this post


Link to post
Share on other sites



Most of the function definitions in <IE.au3> are using ByRef for the object reference e.g. _IEFormElementSetValue ( ByRef $o_object, .....). So if I got an object returned by _IEGetObjById() and want to pass it to _IEFormElementSetValue (), is it a must to use ByRef in all my intermediate function parameters passing the $o_object reference ? Since _IEFormElementSetValue () is expecting a ByRef $o_object.

There is only a difference in calling a function that uses a ByRef input parameter if the function changes that variable. None of the _IE* functions that receive $o_object ByRef make any changes to it (except _IEQuit). So ByRef or not makes no difference to you in calling those functions.

Whether your own functions should make changes to the variable outside of the _IE* functions depends entirely on what yours are meant to do.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0