Jump to content
Sign in to follow this  

Error on _IEPropertyGet($oIE, "vcard")

Recommended Posts

My fault or a bug?

Happens on Win7 and XP with AutoIt and (Beta)

#include <IE.au3>
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)

Func _exit()
    ConsoleWrite(@LF &"Before Exit: IsArray ? = " & IsArray($Array) & @LF& @LF& @LF)
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.    Environment(Language:0407  Keyboard:00000407  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (  from:G:\Program Files (x86)\AutoIt3
+>15:48:53 AU3Check ended.rc:0
>Running:(\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] & '")')

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?



App: Au3toCmd              UDF: _SingleScript()                             

Share this post

Link to post
Share on other sites

This is a cleaner reproducer:

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

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

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

Share this post

Link to post
Share on other sites

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


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

Share this post

Link to post
Share on other sites

Maybe, but not sure...

Change the line 2779 in the IE.au3 file

Local $aVcard[1][29]


Local $aVcard[2][29]


PsaltyDS sucks.

You should be a president. And remember, reading can hurt your eyes.




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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...