cornernote Posted June 26, 2009 Share Posted June 26, 2009 When I try this on my PC it is fine, but when I try it on a XP VM it fails. The VM has xplite installed and fairly much everything is stripped off. What does Scripting.Dictionary need in order to work? $o = ObjCreate("Scripting.Dictionary") $o.Add ("test", "Test") test.au3 (2) : ==> Variable must be of type "Object".: $o.Add ("test", "Test") $o^ ERROR Link to comment Share on other sites More sharing options...
cornernote Posted June 26, 2009 Author Share Posted June 26, 2009 same issue with System.Collections.ArrayList: $o = ObjCreate("System.Collections.ArrayList"); create $o.Add('test') test.au3 (2) : ==> Variable must be of type "Object".: $o.Add ('test') $o^ ERROR Link to comment Share on other sites More sharing options...
BrettF Posted June 26, 2009 Share Posted June 26, 2009 You must have those objects registered. Since you said its a lite version, then you probably don't. Have you tried using a custom error handler? For example: $oIE=ObjCreate("InternetExplorer.Application.1") ; Create Internet Explorer application Global $g_eventerror = 0 ; to be checked to know if com error occurs. Must be reset after handling. $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler $oIE.UnknownMethod ; Deliberately call an undefined method If $g_eventerror then $g_eventerror = 0 Msgbox (0,"AutoItCOM test","Test passed: We got an error number: " & @error) Else Msgbox (0,"AutoItCOM test","Test failed!") Endif Exit ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Local $err = $oMyError.number If $err = 0 Then $err = -1 $g_eventerror = $err ; to check for after this function returns Endfunc Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
cornernote Posted June 26, 2009 Author Share Posted June 26, 2009 You must have those objects registered. Since you said its a lite version, then you probably don't.How do I register them? What files or installed programs or services do they depend on? Link to comment Share on other sites More sharing options...
cornernote Posted June 26, 2009 Author Share Posted June 26, 2009 I think it could be this:Microsoft .NET Framework 3.0 Redistributable Packagehttp://www.microsoft.com/downloads/details...F5-25634C3BF043i will test it out and update the thread with my results Link to comment Share on other sites More sharing options...
cornernote Posted June 26, 2009 Author Share Posted June 26, 2009 I think it could be this:Microsoft .NET Framework 3.0 Redistributable Packagehttp://www.microsoft.com/downloads/details...F5-25634C3BF043i will test it out and update the thread with my resultsThis gets System.Collections.ArrayList working, but Scripting.Dictionary still fails. Link to comment Share on other sites More sharing options...
cornernote Posted June 26, 2009 Author Share Posted June 26, 2009 Scripting.Dictionary requires:Windows Script 5.6 for Windows XP and Windows 2000http://www.microsoft.com/downloads/details...EB-95A22B832CAAit works now Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now