Jump to content

Error on _IEPropertyGet($oIE, "vcard")


Recommended Posts

My fault or a bug?

Happens on Win7 and XP with AutoIt 3.3.6.1 and 3.3.7.10 (Beta)

#include <IE.au3>
OnAutoItExitRegister("_exit")
Global $Array[2][99]
$oIE = _IECreate()
ConsoleWrite(@LF & @LF & "Before PropertyGet: IsArray ? = " & IsArray($Array) & @LF & @LF)
$Array = _IEPropertyGet($oIE, "vcard")
;next statament is not performed due to error in AutoIt
ConsoleWrite("After PropertyGet: IsArray ? = " & IsArray($Array) & @LF & "Error: " & @error)
Exit

Func _exit()
    ConsoleWrite(@LF &"Before Exit: IsArray ? = " & IsArray($Array) & @LF& @LF& @LF)
    _IEQuit($oIE)
EndFunc   ;==>_exit

Consoleoutput is:

>"G:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "O:\Data\AutoIt\try2.au3" /autoit3dir "G:\Program Files (x86)\AutoIt3" /UserParams    
+>15:48:53 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0407  Keyboard:00000407  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.19.0)  from:G:\Program Files (x86)\AutoIt3
+>15:48:53 AU3Check ended.rc:0
>Running:(3.3.6.1):G:\Program Files (x86)\AutoIt3\autoit3.exe "O:\Data\AutoIt\try2.au3"    


Before PropertyGet: IsArray ? = 1

G:\Program Files (x86)\AutoIt3\Include\IE.au3 (2810) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aVcard[1][$i] = Execute('$o_object.document.parentWindow.top.navigator.userProfile.getAttribute("' & $aVcard[0][$i] & '")')
^ ERROR

Before Exit: IsArray ? = 1


->15:48:54 AutoIT3.exe ended.rc:1
>Exit code: 1    Time: 2.251

Is this a known bug or should I submit a bug report?

Thanks

Forumer100

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

This is a cleaner reproducer:

#include <Array.au3>
#include <IE.au3>

Global $Array
_IEErrorHandlerRegister()
$oIE = _IECreate()
$Array = _IEPropertyGet($oIE, "vcard")
If IsArray($Array) Then
    _ArrayDisplay($Array, "$Array")
Else
    ConsoleWrite("Error: $Array is not an array." & @LF)
EndIf

This is the relevant part of IE.au3:

; line 2779         Local $aVcard[1][29]
            Local $aVcard[2][29]  ; Corrected line

Make a copy of IE.au3 to _IE.au3, change line 2779, change your #include to <_IE.au3>, and try it again.

:)

P.S. It does not appear to be in the bug tracker yet.

Edited by PsaltyDS
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
Link to comment
Share on other sites

I guess this shows how popular that function call is... that's a day-one bug in the array dimensioning.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...