Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3204 closed Bug (No Bug)

"if" function does not see variables that contain _IE objects as being "true"

Reported by: mexykanu Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.2 Severity: None
Keywords: Cc:

Description

Hello,

We have the following code:

Global $oIE = _IEAttach("your website","url")

local $body1 = _IETagNameGetCollection($oie,'body',0)
local $body2 = False
local $body3 = True
local $body4 = 'text'
local $body5 = 2
if $body1 Then
	MsgBox(0,'','body1 is not empty')
EndIf
if $body2 Then
	MsgBox(0,'','body2 is not empty')
EndIf
if $body3 Then
	MsgBox(0,'','body3 is not empty')
EndIf
if $body4 Then
	MsgBox(0,'','body4 is not empty')
EndIf
if $body5 Then
	MsgBox(0,'','body5 is not empty')
EndIf

Issue: if $body1 does not return True but the variable $body1 contains information. This is very confusing and generates a lot of wasted time debugging code that has no bugs.

Workaround: using the following code returns True

if $body1 <> '' Then

Attachments (0)

Change History (2)

comment:1 by mLipok, 10 years ago

Resolution: No Bug
Status: newclosed

This is not AutoIt or UDF bug.
This is not support forum.
Ask here:
https://www.autoitscript.com/forum/forum/2-autoit-general-help-and-support/

comment:2 by mexykanu, 10 years ago

OK, But what is an autoit bug then ?! Doesn't this bug relate to the "if" function in AutoIt ?

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.