Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 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 Changed 4 years ago by mLipok

  • Resolution set to No Bug
  • Status changed from new to closed

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 Changed 4 years ago by mexykanu

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.