Sign in to follow this  
Followers 0
lfast

failures in assignment $o2 = $o1 and if "string" = $obj.name

2 posts in this topic

The newbie questions just keep coming. I'm getting odd behaviour out of two code fragments that look reasonable but perhaps not?

Does the equals (assignment) operator copy complete _IE objects? Or do I need to invoke some kind of copyObj() function? I'm getting what looks like assignment failure from:

$oFormElement.name = "systemRight"

$oCopyOfElem = $oFormElement

==> $oCopyOfElem.name is null.

And does IF "someString" = $myString work? I'm getting behaviour that suggest the comparison is only occuring on the first character. Or perhaps even the string pointer.

Thoughts?

Share this post


Link to post
Share on other sites



Does the equals (assignment) operator copy complete _IE objects?

If I'm correct, Nope. It will copy the reverence(pointer) of/to the object.

does IF "someString" = $myString work?

Considering its been there for a long long time ... So I think so.

Language Reference - Datatypes

Language Reference - Operators

And just in case Language Reference - Conditional Statements

Remember: AutoIt -> Variant -> Auto Conversions active when doing something that involves two different data types. (strings, numbers, bools)(not sure about binary type at this moment, but I think the point is clear.)


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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